OKLCH to HEX: #D4D4D8

Also known as: Tailwind zinc-300, Tailwind v3 zinc-300

Result

oklch(0.87111 0.00545 286.286) → #D4D4D8

Values are shown at full precision, so converting back gives exactly #d4d4d8. 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.87111 0.00545 286.286)
  2. 2. OKLCH → Oklab

    a = C·cos H = 0.00153
    b = C·sin H = -0.00523
  3. 3. Oklab → LMS′

    l′ = L + 0.3963·a + 0.2158·b = 0.870587
    m′ = L − 0.1056·a − 0.0639·b = 0.871283
    s′ = L − 0.0895·a − 1.2915·b = 0.877729
  4. 4. cube

    l = 0.870587³ = 0.659836
    m = 0.871283³ = 0.661420
    s = 0.877729³ = 0.676211
  5. 5. LMS → linear sRGB

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

    R = 0.83138 × 255 = 212.00 → 212
    G = 0.83138 × 255 = 212.00 → 212
    B = 0.84706 × 255 = 216.00 → 216
  7. 7. RGB → HEX

    #D4D4D8

All formats

HEX
#d4d4d8
RGB
rgb(212 212 216)
RGB (legacy)
rgb(212, 212, 216)
HSL
hsl(240.00 4.88% 83.92%) → hsl(240 5% 84%)
HWB
hwb(240 83% 15%)
OKLCH
oklch(0.871 0.005 286.3) · oklch(87.1% 0.005 286.3)
OKLab
oklab(0.871 0.002 -0.005)
Lab (D50)
lab(85.00 0.55 -1.98)
LCH (D50)
lch(85.00 2.05 285.40)
Display P3
color(display-p3 0.8314 0.8314 0.8457)
Linear sRGB
color(srgb-linear 0.6584 0.6584 0.6867)

Gamut: sRGB and Display P3

#D4D4D8 is a hex color, so it sits inside sRGB and therefore inside Display P3. At this lightness and hue, sRGB reaches chroma 0.066 and Display P3 reaches 0.073; this color uses 8% of the sRGB chroma available.

CSS snippets

.element {
  color: #d4d4d8;
  color: rgb(212 212 216);
  color: hsl(240 5% 84%);
  color: oklch(0.871 0.005 286.3);
}

/* Tailwind CSS v4 */
@theme {
  --color-brand: oklch(0.871 0.005 286.3);
}
/* arbitrary values */
class="text-[#d4d4d8] bg-[oklch(0.871_0.005_286.3)]"

/* wide-gamut screens */
@media (color-gamut: p3) {
  .element { color: color(display-p3 0.8314 0.8314 0.8457); }
}

/* relative color syntax: 10% darker */
.element-dark { color: oklch(from #d4d4d8 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

  • #E8E8EC · oklch(0.931 0.005 286.3) · ΔL +0.06
  • #C1C1C5 · oklch(0.811 0.005 286.3) · ΔL −0.06

Open in the studio

Other converters for this color

All converters →

Guides: What is OKLCH?