Skip to content
colors

oklabToHex

The `oklabToHex` function converts OKLab values to a HEX color string.

1 min read55 words

Function Signature

js

oklabToHex(L: number, a: number, b: number): string

Parameters

  • L (number): OKLab lightness.
  • a (number): OKLab green-red axis.
  • b (number): OKLab blue-yellow axis.

Return Value

A lowercase HEX string in the format #rrggbb.

js

const lab = hexToOklab("#ff6600");
oklabToHex(lab.L, lab.a, lab.b);
// "#ff6600"

Usage Notes

  • Out-of-gamut OKLab values are clipped to valid sRGB.
  • Use with hexToOklab for round-trip operations.

Previous

hexToOklab

Next

rgbToOklch


Top-Werkzeuge

BoardlyLinksyChromoCodeHub

ReadyTools

KarriereKontaktWerkzeuge
Preise7 Tage gratis
AnleitungenDocsBlogUpdatesLaraVault

Sprache wählen

Thema wählen

© 2026 ReadyTools. Alle Rechte vorbehalten.