OKLCH to HEX: #101828

Also known as: Tailwind gray-900

Result

oklch(0.20991 0.03413 263.436) → #101828

Values are shown at full precision, so converting back gives exactly #101828. The rounded form is what you normally paste into CSS.

Step-by-step math

Every number below is computed from the input, nothing is looked up.

  1. 1. input

    oklch(0.20991 0.03413 263.436)
  2. 2. OKLCH → Oklab

    a = C·cos H = -0.00390
    b = C·sin H = -0.03391
  3. 3. Oklab → LMS′

    l′ = L + 0.3963·a + 0.2158·b = 0.201047
    m′ = L − 0.1056·a − 0.0639·b = 0.212487
    s′ = L − 0.0895·a − 1.2915·b = 0.254049
  4. 4. cube

    l = 0.201047³ = 0.008126
    m = 0.212487³ = 0.009594
    s = 0.254049³ = 0.016396
  5. 5. LMS → linear sRGB

    R = 4.0767·l − 3.3077·m + 0.2310·s = 0.005182
    G = −1.2684·l + 2.6098·m − 0.3413·s = 0.009134
    B = −0.0042·l − 0.7034·m + 1.7076·s = 0.021216
  6. 6. linear → sRGB, × 255

    R = 0.06275 × 255 = 16.00 → 16
    G = 0.09412 × 255 = 24.00 → 24
    B = 0.15685 × 255 = 40.00 → 40
  7. 7. RGB → HEX

    #101828

All formats

HEX
#101828
RGB
rgb(16 24 40)
RGB (legacy)
rgb(16, 24, 40)
HSL
hsl(220.00 42.86% 10.98%) → hsl(220 43% 11%)
HWB
hwb(220 6% 84%)
OKLCH
oklch(0.210 0.034 263.4) · oklch(21.0% 0.034 263.4)
OKLab
oklab(0.210 -0.004 -0.034)
Lab (D50)
lab(8.12 0.58 -12.27)
LCH (D50)
lch(8.12 12.29 272.73)
Display P3
color(display-p3 0.0691 0.0932 0.1520)
Linear sRGB
color(srgb-linear 0.0052 0.0091 0.0212)

Gamut: sRGB and Display P3

#101828 is a hex color, so it sits inside sRGB and therefore inside Display P3. At this lightness and hue, sRGB reaches chroma 0.111 and Display P3 reaches 0.135; this color uses 31% of the sRGB chroma available.

CSS snippets

.element {
  color: #101828;
  color: rgb(16 24 40);
  color: hsl(220 43% 11%);
  color: oklch(0.210 0.034 263.4);
}

/* Tailwind CSS v4 */
@theme {
  --color-brand: oklch(0.210 0.034 263.4);
}
/* arbitrary values */
class="text-[#101828] bg-[oklch(0.210_0.034_263.4)]"

/* wide-gamut screens */
@media (color-gamut: p3) {
  .element { color: color(display-p3 0.0691 0.0932 0.1520); }
}

/* relative color syntax: 10% darker */
.element-dark { color: oklch(from #101828 calc(l - 0.1) c h); }

Nearby colors

Closest colors in the Tailwind and CSS named palettes (OKLab distance).

Lighter and darker, same hue and chroma

  • #1E2637 · oklch(0.270 0.034 263.4) · ΔL +0.06
  • #050B19 · oklch(0.150 0.034 263.4) · ΔL −0.06

Open in the studio

Other converters for this color

All converters →

Guides: What is OKLCH?