Skip to content
colors

oklchToHex

The `oklchToHex` function converts OKLCH values to a HEX color string.

1 min read56 words

Function Signature

js

oklchToHex(L: number, C: number, h: number): string

Parameters

  • L (number): OKLCH lightness.
  • C (number): OKLCH chroma.
  • h (number): OKLCH hue angle in degrees.

Return Value

A lowercase HEX string in the format #rrggbb.

js

const lch = hexToOklch("#ff6600");
oklchToHex(lch.L, lch.C, lch.h);
// "#ff6600"

Usage Notes

  • Hue values are normalized before conversion.
  • Out-of-gamut OKLCH values are clipped to valid sRGB.

Previous

hexToOklch

Next

lighten


Herramientas destacadas

BoardlyLinksyChromoHub de Código

ReadyTools

CarrerasContactoHerramientas
Precios7 días gratis
GuíasDocsBlogUpdatesLaraVault

Seleccionar idioma

Establecer tema

© 2026 ReadyTools. Todos los derechos reservados.