diff --git a/src/hooks/useViewModelInstanceColor.ts b/src/hooks/useViewModelInstanceColor.ts index 7566017..00e033d 100644 --- a/src/hooks/useViewModelInstanceColor.ts +++ b/src/hooks/useViewModelInstanceColor.ts @@ -20,10 +20,10 @@ export default function useViewModelInstanceColor( { value: number; setValue: (value: number) => void; - rgb: (r: number, g: number, b: number) => void; - rgba: (r: number, g: number, b: number, a: number) => void; - alpha: (a: number) => void; - opacity: (o: number) => void; + setRgb: (r: number, g: number, b: number) => void; + setRgba: (r: number, g: number, b: number, a: number) => void; + setAlpha: (a: number) => void; + setOpacity: (o: number) => void; } >( path, @@ -34,10 +34,10 @@ export default function useViewModelInstanceColor( (instance, value, setValue) => ({ value, setValue, - rgb: (r, g, b) => instance?.rgb(r, g, b), - rgba: (r, g, b, a) => instance?.rgba(r, g, b, a), - alpha: (a) => instance?.alpha(a), - opacity: (o) => instance?.opacity(o), + setRgb: (r, g, b) => instance?.rgb(r, g, b), + setRgba: (r, g, b, a) => instance?.rgba(r, g, b, a), + setAlpha: (a) => instance?.alpha(a), + setOpacity: (o) => instance?.opacity(o), }) ); } \ No newline at end of file diff --git a/src/types.ts b/src/types.ts index a39b92c..70ebfd7 100644 --- a/src/types.ts +++ b/src/types.ts @@ -178,7 +178,7 @@ export type UseViewModelInstanceColorResult = { * Set the red value of the color. * @param r - The red value to set the color to. */ - rgb: (r: number, g: number, b: number) => void; + setRgb: (r: number, g: number, b: number) => void; /** * Set the red, green, blue, and alpha values of the color. * @param r - The red value to set the color to. @@ -186,17 +186,17 @@ export type UseViewModelInstanceColorResult = { * @param b - The blue value to set the color to. * @param a - The alpha value to set the color to. */ - rgba: (r: number, g: number, b: number, a: number) => void; + setRgba: (r: number, g: number, b: number, a: number) => void; /** * Set the alpha value of the color. * @param a - The alpha value to set the color to. */ - alpha: (a: number) => void; + setAlpha: (a: number) => void; /** * Set the opacity value of the color. * @param o - The opacity value to set the color to. */ - opacity: (o: number) => void; + setOpacity: (o: number) => void; }; export type UseViewModelInstanceEnumResult = {