interface UIColor.Output
An interface that represents the output of a resolved UIColor.
interface Output;
Notes
- OKLCH values (l, c, h, alpha) are always available directly.
- RGB and CSS strings are computed lazily via methods, and cached after first call.
- For raw CSS colors,
rawis the original string;l/c/hare 0.
Instance members
l readonly
OKLCH lightness, 0-1 (0 for raw).c readonly
OKLCH chroma, 0-~0.4 (0 for raw).h readonly
OKLCH hue, 0-360 (0 for raw).alpha readonly
Alpha, 0-1 (1 for raw).raw readonly
Raw CSS string for unparsed colors, or undefined.rgb()
Returns sRGB [r, g, b] (each 0-255). Lazy, cached after first call.rgbaString()
Returns a CSS rgba() or rgb() string. Lazy, cached after first call.oklchString()
Returns a CSS oklch() string. Lazy, cached after first call.
Related
class UIColor
A class that represents a single color value.
