Linear alpha, [0, 1], where 1 is fully opaque. Null when the color is used in an opacity-irrelevant slot such as a light or emissive color, distinct from 0 (fully transparent).
Linear blue, [0, 1].
Linear green, [0, 1].
Optional sRGB #RRGGBB label for human and LLM readability and viewer swatches, or null. Write it with linearColorToSrgbHex rather than by hand; validation refuses a label that disagrees with the quantized sRGB encoding of the linear components, ignoring letter case.
Linear red, [0, 1].
A linear-RGB color with optional alpha, the canonical color value for materials, lights, fog, backgrounds and decorative tints.
Components are linear (not sRGB-gamma-encoded) numbers in
[0, 1], matching how PBR shaders and glTFbaseColorFactorconsume color.hexis an optional sRGB label for human and LLM readability and viewer swatches; the engine renders the linear triple and never decodeshex.Derive the label, do not type it.
linearColorToSrgbHexwriteshexfrom the triple,srgbHexToLinearColorwrites the triple from a swatch, and the two round-trip exactly for every eight-bit channel value. Bare#RRGGBBfields elsewhere carry the color rather than label one, so they are sRGB inputs: the builder and instance viewer sharesrgbHexToLinearColorfor recipe and instance palettes, while the effect viewer applies three.js's equivalent decode to particle colors. A swatch pasted intor,g,bunconverted lands about 2.3 times too bright at midtones:#808080becomes linear0.502where the swatch means0.216.The shared validateColor gate requires a present hex label to match the eight-bit sRGB encoding of the linear RGB triple, ignoring letter case. Alpha does not enter that swatch. A malformed or contradictory label is refused; validation never changes the authoritative numeric channels.
Reference: glTF 2.0
pbrMetallicRoughness.baseColorFactor(linear), CSS Color Module Level 4.