Abstract
Static
Converts a HEX color string to an RGB object. Supports shorthand (#abc) and full (#aabbcc) formats.
A HEX color string (e.g., "#ff0000" or "ff0000").
An RGB object.
Converts an RGB object to a HEX color string.
The RGB color object.
A HEX string (e.g., "#aabbcc").
Converts an RGB color to HSL.
The RGB color to convert.
An HSL color object.
Converts an HSL color to RGB.
The HSL color object.
An RGB color object.
Linearly blends between two RGB colors.
The first color.
The second color.
A value between 0 and 1 determining the blend weight.
A new blended RGB color.
Alpha-blends two RGBA colors.
The base color with alpha.
The overlay color with alpha.
The resulting RGB color after alpha blending.
Inverts the given RGB color.
The RGB color to invert.
The inverted RGB color.
Converts an RGB color to grayscale using luminosity method.
A grayscale RGB color.
Adjusts the brightness of an RGB color.
The RGB color to adjust.
A factor between -1 (darker) and 1 (brighter).
The adjusted RGB color.
Converts a HEX color string to an RGB object. Supports shorthand (#abc) and full (#aabbcc) formats.