adjustRgb()
The adjustHsl
function allows you to adjust the RGB (Red, Green, Blue) values of a color object.
This function returns a new Spectrum
instance with the updated RGB values.
Usage
Parameters
adjustRgb(colorObj, options)
Parameter | Type | Required | Valid range | Description |
---|---|---|---|---|
colorObj | Spectrum instance | true | - | The Spectrum instance representing the color you want to adjust |
options.red | number | false | [-255; 255] | The amount by which to adjust the red channel value |
options.green | number | false | [-255; 255] | The amount by which to adjust the green channel value |
options.blue | number | false | [-255; 255] | The amount by which to adjust the blue channel value |
options.alpha | number | false | [-1; 1] | The amount by which to adjust the alpha channel value |
Return Value
The adjustRgb
function returns a new Spectrum
instance with the adjusted RGB values.