ColorRGBa
Represents a color in the RGBA color space. Each component, including red, green, blue, and alpha (opacity), is represented as a Double in the range [0.0, 1.0]. The color can be defined in either linear or sRGB space, determined by the linearity property.
This class provides a wide variety of utility functions for manipulating and converting colors, such as shading, opacity adjustment, and format transformations. It also includes methods for parsing colors from hexadecimal notation or vectors.
Constructors
Types
Properties
Returns a new instance of ColorRGBa where the red, green, and blue components are multiplied by the alpha value of the original color. The alpha value and linearity remain unchanged.
Indicates whether the color is defined in linear or sRGB space. Defaults to Linearity.LINEAR.
calculate luminance value luminance value is according to https://www.w3.org/TR/2008/REC-WCAG20-20081211/#relativeluminancedef
Functions
calculate the contrast value between this color and the given color contrast value is accordingo to // see http://www.w3.org/TR/2008/REC-WCAG20-20081211/#contrast-ratiodef
Converts this color to the specified linearity.