Skip to content

ColorToString ​

Generated from the engine's own definition: compute-engine's symbol, which we neither extend nor document by hand. No examples yet — the crosswalk is the reason it has a page.

Convert a color to a string in the specified format: "hex" (the default), "rgb", "hsl", "oklch", "srgb" (the same as "hex") or "display-p3" (the CSS spelling color(display-p3 r g b)). The hex, rgb, hsl and srgb formats map the color into the sRGB gamut, and display-p3 maps it into the Display-P3 gamut, with the CSS Color 4 gamut mapping: the OKLCh chroma is reduced at constant lightness and hue. The channels are not clipped one by one. The oklch format has no gamut and is not mapped

ColorToString(color | string | tuple, string?) -> stringas compute-engine declares it
Typed signatures
TypePackageApplies
(color | string | tuple, string?) -> stringcompute-enginealways

Domain: Compute engine

About