Specified color
Hexadecimal color string.
red component of the color, default value is 0.
green component of the color, default value is 0.
blue component of the color, default value is 0.
alpha component of the color, default value is 255.
Get or set alpha channel value.
Get or set alpha channel value.
Get or set blue channel value.
Get or set blue channel value.
Get or set green channel value.
Get or set green channel value.
Get or set red channel value.
Get or set red channel value.
Clone a new color from the current color.
Check whether the current color is identical with the given color
Specified color
Returns true
when all channels of both colours are equal; otherwise returns false
.
Read hex string and store color data into the current color object, the hex string must be formatted as rgba or rgb.
the hex string
this
Read HSV model color and convert to RGB color.
H value。
S value。
V value。
this
Calculate linear interpolation result between this color and another one with given ratio。
Target color
The interpolation coefficient.The range is [0,1].
Multiplies the current color by the specified color.
The specified color.
Convert color to css format.
"rgba", "rgb", "#rgb" or "#rrggbb".
CSS format for the current color.
convert Color to HEX color string.
"#rrggbb" or "#rrggbbaa".
'#rrggbbaa'
obtains the hexadecimal value of the Red, Green, Blue, Alpha channels (two, high complement 0) and connects them sequentially.'#rrggbb'
is similar to '#rrggbbaa'
but does not include the Alpha channel.the Hex color string
Transform to HSV model color.
HSV format color
Convert to rgb value.
RGB integer value. Starting from the lowest valid bit, each 8 bits is the value of the Red, Green, and Blue channels respectively.
Convert to string with color informations
A string representation of the current color.
Add two colors by components. And save the results to out color.
Copy content of a color into another and save the results to out color.
Clone a color and save the results to out color.
Divide each components of color a by each components of color b. And save the results to out color.
Check whether the two given colors are approximately equivalent. Difference of each channel is smaller that the epsilon.
Sets the given color with RGBA values in an array, and save the results to out color.
Array Start Offset
Converts the hexadecimal formal color into rgb formal and save the results to out color.
Convert the given color to a hex color value. And save the results to out color.
Performs a linear interpolation between two colors.
Multiply each components of two colors. And save the results to out color.
Multiply all channels in a color with the given scale factor, and save the results to out color.
Set the components of a color to the given values and save the results to out color.
Check whether the two given colors are identical
Subtract each components of color b from each components of color a. And save the results to out color.
Convert a color object to a RGBA array, and save the results to out color.
Array Start Offset
Generated using TypeDoc
Representation of RGBA colors.
Each color component is an integer value with a range from 0 to 255.