The alpha channel channel value of this RGBA color instance
The blue channel value of this RGBA color instance
The color format of a RGBA color instance
The green channel value of this RGBA color instance
The hue channel value from the corresponding HSLA color space
The lightness channel value from the corresponding HSLA color space
The red channel value of this RGBA color instance
The saturation channel value from the corresponding HSLA color space
Changes the "alpha" channel value BY a given delta
The instance that was acted upon → for function chaining
Changes the "alpha" channel value TO a given input value
The instance that was acted upon → for function chaining
Finds the normalized brightness of the color
A value in the range [0, 1] = [dim (black), bright (white)] (or [0, 100] if percentage = true
)
Finds the closest cool color instance to the current color (in HSLA space)
Finds the closest pure hue color instance corresponding to the current color (in HSLA space)
Finds the closest warm color instance to the current color (in HSLA space)
Finds the closest Web Safe color to the current color
The instance that was acted upon → for function chaining
Converts a RGBA color instance to CMYKA color object
Given a background color as input, determines the contrast ratio if the current color is used as the foreground color
The contrast between current color instance and bgColor
as a number (value → ratio = false
) or string ("value:1" → ratio = true
)
Removes lightness (tone) of the color in HSLA space
The instance that was acted upon → for function chaining
De-saturates (intensity) the color in HSLA space
The instance that was acted upon → for function chaining
Given an input color to compare with, determine if that color is identical to the current color instance
The color to compare against for equality
True if the two color instances are identical (same RGBA channel values). False otherwise.
Sets the saturation of the color to 0% in HSLA space
The instance that was acted upon → for function chaining
Generates an RGBA color instance array based on the corresponding harmony
- The only exception to this are 'analogous' and 'double-split-complementary',
which return the original color as the second element.
- For 'monochromatic' the original color is always first and the array size is `amount + 1` evenly spaced colors.
Converts a RGBA color instance to HEXA color object
A HSLA object containing the respective channel values
Converts a RGBA color instance to HSLA color object
A HSLA object containing the respective channel values
Converts a RGBA color instance to HSVA color object
Changes the "hue" channel value BY a given delta (done in HSLA space and converted back to RGBA space)
The instance that was acted upon → for function chaining
Changes the "hue" channel value TO a given input value (done in HSLA space and converted back to RGBA space)
The instance that was acted upon → for function chaining
Converts a RGBA color instance to HWBA color object
Given an input color, get its inverse value by subtracting current value from the upper bound for each channel
The corresponding inverse color
"Cool colors give an impression of calm, and create a soothing impression"
These typically contain more blue and green pigmentation (higher hue)
Determines if a given color is dark based on its brightness (brightness < 0.50)
Determines if a given color is light based on its brightness (brightness ≥ 0.50)
Helper for determining if a given color instance is pure (not tinted, shaded, or toned)
boolean (if reason is truthy) OR an object containing the reason for purity determination (if reason is falsy)
Helper for determining if a given color instance is shaded (lightness deviated downwards from a pure hue whose lightness is 50%)
Helper for determining if a given color instance is tinted (lightness deviated upwards from a pure hue whose lightness is 50%)
Helper for determining if a given color instance is toned (saturation deviated from a pure hue whose saturation is 100%)
Determines if the current color instance is valid (based on the format returned by the parsers)
"Warm colors are vivid and energetic, and tend to advance in space"
These typically contain more red and yellow pigmentation (lower hue)
Converts a RGBA color instance to LABA color object
Converts a RGBA color instance to LCHA color object
Adds lightness (tone) of the color in HSLA space
The instance that was acted upon → for function chaining
Sets the lightness (tone) of a color in HSLA space to a specific value
The instance that was acted upon → for function chaining
Finds normalized relative luminance of the color
A value in the range [0, 1] = [darkest black, lightest white] (or [0, 100] if percentage = true
)
Converts a RGBA color instance to LUVA color object
Mix current color instance with another based on a given ratio (done in LUVA space by default for best results)
A new color instance corresponding to the new mixture
Gets the color table HTML/CSS name for a given color
The color's HTML/CSS name
Given a background color as input, determines if the current color is readable if it is used as the foreground color
Minimum | Enhanced | |
---|---|---|
Body | 4.5:1 | 7.0:1 |
Large | 3.0:1 | 4.5:1 |
Whether or not the color is readable on bgColor
Converts a RGBA color instance to RGBA color object
A HSLA object containing the respective channel values
Rotation changes the hue of a color by value
degrees in HSLA space
The instance that was acted upon → for function chaining
Converts a RGBA color instance to RYBA color object
Saturates (intensity) the color in HSLA space
The instance that was acted upon → for function chaining
Sets the saturation (intensity) of color in HSLA space to a specific value
The instance that was acted upon → for function chaining
Gives the string representation of an input CMYKA color object
device-cmyk(C, M, Y, K[, A])
Gives the string representation of an input HEXA color object
#RRGGBB[AA]
Gives the string representation of an input HSLA color object
hsl[a](H, S, L[, A])
Gives the string representation of an input HSVA color object
hsv[a](H, S, V[, A])
Gives the string representation of an input HWBA color object
hwb[a](H, W, B[, A])
Gives the string representation of an input LABA color object
lab[a](L, A, B[, A])
Gives the string representation of an input LCHA color object
lch[a](L, C, H[, A])
Gives the string representation of an input LUVA color object
color(luv[a] L, A, B[, A])
Gives the string representation of an input RGBA color object
rgb[a](R, G, B[, A])
Gives the string representation of an input RYBA color object
color(ryb[a] R, Y, B[, A])
Gives the string representation of an input UVWA color object
color(uvw[a] U, V, W[, A])
Gives the string representation of an input XYZA color object
color(xyz[a] X, Y, Z[, A])
Converts a RGBA color instance to UVWA color object
Converts a RGBA color instance to XYZA color object
Generates color space instances that ColorMaster can interpret. This allows the user to manipulate colors via helpful functions/wrappers.
If a color's values are not valid, ColorMaster uses "black" or a mixture with provided values that are valid (in the corresponding colorspace) by default. Additionally, ColorMaster works in RGBA space internally by default and only converts to other color spaces as necessary. For example, printing a string requires conversion to the correct color space. On that end, it is also easier to work with HSLA space when performing rotation and other hue related adjustments. This approach ensures the highest possible accuracy when converting to other color spaces.