Skip to content
colors

oklabToRgb

The `oklabToRgb` function converts OKLab values back to RGB channel values.

1 min read61 words

Function Signature

js

oklabToRgb(L: number, a: number, b: number): { r: number, g: number, b: number }

Parameters

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

Return Value

An RGB object with integer r, g, and b channels clamped to 0-255.

js

const lab = hexToOklab("#ff6600");
oklabToRgb(lab.L, lab.a, lab.b);
// { r: 255, g: 102, b: 0 }

Usage Notes

  • Out-of-gamut values are clipped to valid sRGB.
  • Pair with rgbToOklab or hexToOklab for round-trip conversions.

Previous

rgbToOklab

Next

hexToOklab


Top-Werkzeuge

BoardlyLinksyChromoCodeHub

ReadyTools

KarriereKontaktWerkzeuge
Preise7 Tage gratis
AnleitungenDocsBlogUpdatesLaraVault

Sprache wählen

Thema wählen

© 2026 ReadyTools. Alle Rechte vorbehalten.