Red component (0-1).
Green component (0-1).
Blue component (0-1).
Alpha component (0-1).
Alpha component (0-1).
Blue component (0-1).
Green component (0-1).
Red component (0-1).
Static ReadonlyAQUAStatic ReadonlyBLACKStatic ReadonlyBLUEStatic ReadonlyCYANStatic ReadonlyFUCHSIAStatic ReadonlyGRAYStatic ReadonlyGREENStatic ReadonlyLIMEStatic ReadonlyMAGENTAStatic ReadonlyMAROONStatic ReadonlyNAVYStatic ReadonlyOLIVEStatic ReadonlyPURPLEStatic ReadonlyREDStatic ReadonlySILVERStatic ReadonlyTEALStatic ReadonlyTRANSPARENTStatic ReadonlyWHITEStatic ReadonlyYELLOWReturns the color components as an array.
[r, g, b, a]
Returns the color components as a Float32Array.
Float32Array(4)
Returns the color components as a hex string (e.g. "#FF0000").
Whether to include the alpha channel (e.g. "#FF0000FF").
Returns the color components as HSL.
An object with { h: (0-360), s: (0-1), l: (0-1) }
Returns the color components as HSV/HSB.
An object with { h: (0-360), s: (0-1), v: (0-1) }
Returns the RGB components as a Vector3D.
StaticblackbodyEvaluates a thermal blackbody radiation color ramp from normalized temperature t in [0, 1].
Normalized temperature in [0, 1] (clamped automatically).
Optionaltarget: Color
Optional existing Color instance to mutate (avoids GC allocations).
StaticfromStaticfromCreates a Color from HSL (Hue, Saturation, Lightness).
Hue (0 - 360).
Saturation (0.0 - 1.0).
Lightness (0.0 - 1.0).
Alpha (0.0 - 1.0). Default is 1.0.
StaticfromCreates a Color from HSV/HSB (Hue, Saturation, Value/Brightness).
Hue (0 - 360).
Saturation (0.0 - 1.0).
Value/Brightness (0.0 - 1.0).
Alpha (0.0 - 1.0). Default is 1.0.
StaticfromCreates a Color from a CSS/X11 named color (e.g. "papayawhip", "royalblue", "coral").
StaticfromConverts a color temperature in Kelvin (1000K to 40000K) to standard RGB color. Based on Tanner Helland's analytic Planckian locus fit.
Temperature in Kelvin (e.g. 1900 for candlelight, 5500 for midday sun, 10000 for blue sky).
Optionaltarget: Color
Optional existing Color instance to mutate (avoids GC allocations).
Creates a new Color.