HEX to OKLCH: #1C1917

Also known as: Tailwind stone-900, Tailwind v3 stone-900

Result

#1C1917 → oklch(0.216 0.006 56.0)

Values are shown at full precision, so converting back gives exactly #1c1917. 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. sRGB → linear

    R: 28/255 = 0.10980 → 0.011612  (((x + 0.055) / 1.055)^2.4)
    G: 25/255 = 0.09804 → 0.009721  (((x + 0.055) / 1.055)^2.4)
    B: 23/255 = 0.09020 → 0.008568  (((x + 0.055) / 1.055)^2.4)
  2. 2. linear sRGB → LMS

    l = 0.4122·R + 0.5363·G + 0.0514·B = 0.010441
    m = 0.2119·R + 0.6807·G + 0.1074·B = 0.009998
    s = 0.0883·R + 0.2817·G + 0.6300·B = 0.009162
  3. 3. cube root

    l′ = ∛0.010441 = 0.218568
    m′ = ∛0.009998 = 0.215430
    s′ = ∛0.009162 = 0.209247
  4. 4. LMS′ → Oklab

    L = 0.2105·l′ + 0.7936·m′ − 0.0041·s′ = 0.21612
    a = 1.9780·l′ − 2.4286·m′ + 0.4506·s′ = 0.00342
    b = 0.0259·l′ + 0.7828·m′ − 0.8087·s′ = 0.00508
  5. 5. Oklab → OKLCH

    C = √(a² + b²) = 0.00613
    H = atan2(b, a) = 56.043°
    L = 0.21612
  6. 6. OKLCH

    oklch(0.21612 0.00613 56.043)
    rounded: oklch(0.216 0.006 56.0)

All formats

HEX
#1c1917
RGB
rgb(28 25 23)
RGB (legacy)
rgb(28, 25, 23)
HSL
hsl(24.00 9.80% 10.00%) → hsl(24 10% 10%)
HWB
hwb(24 9% 89%)
OKLCH
oklch(0.216 0.006 56.0) · oklch(21.6% 0.006 56.0)
OKLab
oklab(0.216 0.003 0.005)
Lab (D50)
lab(9.05 1.18 1.97)
LCH (D50)
lch(9.05 2.30 59.13)
Display P3
color(display-p3 0.1078 0.0985 0.0911)
Linear sRGB
color(srgb-linear 0.0116 0.0097 0.0086)

Gamut: sRGB and Display P3

#1C1917 is a hex color, so it sits inside sRGB and therefore inside Display P3. At this lightness and hue, sRGB reaches chroma 0.053 and Display P3 reaches 0.060; this color uses 12% of the sRGB chroma available.

CSS snippets

.element {
  color: #1c1917;
  color: rgb(28 25 23);
  color: hsl(24 10% 10%);
  color: oklch(0.216 0.006 56.0);
}

/* Tailwind CSS v4 */
@theme {
  --color-brand: oklch(0.216 0.006 56.0);
}
/* arbitrary values */
class="text-[#1c1917] bg-[oklch(0.216_0.006_56.0)]"

/* wide-gamut screens */
@media (color-gamut: p3) {
  .element { color: color(display-p3 0.1078 0.0985 0.0911); }
}

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

  • #2A2725 · oklch(0.276 0.006 56.0) · ΔL +0.06
  • #0F0C0A · oklch(0.156 0.006 56.0) · ΔL −0.06

Open in the studio

Other converters for this color

All converters →

Guides: What is OKLCH?