Returns a new color that is derived from this color with the adjustments applied.
An array of Adjustments
Return the color adjustments.
The base value for the color before adjustments.
Returns true if the other color will resolve to the same rgb values as this color.
The other color to compare.
Returns the color as either 'black or white' depending on the luminance.
Optional
darkMode: booleanOptional
threshold: numberThe threshold to determine if the color is dark or light.
Return a string usable with CSS color properties.
Optional
darkMode: booleanIf true
dark colors will be used.
Optional
alpha: booleanIf true
alpha will be applied.
Return a HEX with adjustments applied.
Optional
darkMode: booleanReturn as HSLA with adjustments applied.
Optional
darkMode: booleanReturn as RGBA with adjustments applied.
Optional
darkMode: boolean
Represents a color with optional adjustments applied.
An
IColor
consists of:baseColor
: The underlying color, which can be a scheme color (e.g., Accent1), a built-in color (e.g., 'red', 'blue'), or defined using various color models (RGB, Hex, HSL).adjustments
(optional): An ordered list of color adjustments that modify thebaseColor
. These adjustments can include effects like grayscale, inversion, or modifications to specific color components (red, alpha, etc.).See
AdjustmentType