TheDocumentation Index
Fetch the complete documentation index at: https://mintlify.com/TextAliveJp/textalive-app-api/llms.txt
Use this file to discover all available pages before exploring further.
Color class stores RGBA color data and lets you read or write color values in a variety of formats — 32-bit integers, hex strings, and CSS-compatible strings. You can construct a Color from a hex string, a 32-bit integer, or another IColor-compatible object.
Color implements the IColor interface.
Constructor
Optional initial value. Accepted formats:
string— hex color string such as"#ff0000"(RGB) or"#ff000080"(RGBA)number— 32-bit ARGB integer or 24-bit RGB integerIColor— copies channel values from another color object
Practical example
IColor interface
TheIColor interface defines the contract that Color implements. All channel values range from 0 to 255.
Channel properties
Alpha channel.
0 is fully transparent, 255 is fully opaque.Red channel
[0–255].Green channel
[0–255].Blue channel
[0–255].Integer representation
Get or set the color as a 32-bit ARGB integer.
String representations
Hex string representing the RGB channels, e.g.
"112233".CSS
rgb() string, e.g. "rgb(17,34,51)".Hex string representing RGBA channels with a leading
#, e.g. "#11223300".Hex string representing ARGB channels with a
0x prefix, e.g. "0x00112233".CSS
rgba() string, e.g. "rgba(17,34,51,0)".Color-specific getters
These properties are available onColor instances (not on the base IColor interface).
The color as a 32-bit ARGB integer.
The color as a 24-bit RGB integer (alpha is ignored).
Hex string with a leading
#, e.g. "#rrggbb".Hex string of the alpha channel component only.
Methods
Returns
true if all four channel values of color match this instance.Returns a string representation of the color.
Sets the color from any supported source format — hex string, integer, or another
IColor.Sets the color from a hex string. Accepts shorthand (
#rgb) and full forms (#rrggbb, #rrggbbaa).Sets the color from a numeric value.
ColorData
ColorData is the serialization format used internally to represent a color in JSON video data.