OKLCH to HEX: #1E293B

Also known as: Tailwind v3 slate-800

Result

oklch(0.27950 0.03685 260.031) → #1E293B

Values are shown at full precision, so converting back gives exactly #1e293b. 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.27950 0.03685 260.031)
  2. 2. OKLCH → Oklab

    a = C·cos H = -0.00638
    b = C·sin H = -0.03629
  3. 3. Oklab → LMS′

    l′ = L + 0.3963·a + 0.2158·b = 0.269139
    m′ = L − 0.1056·a − 0.0639·b = 0.282491
    s′ = L − 0.0895·a − 1.2915·b = 0.326944
  4. 4. cube

    l = 0.269139³ = 0.019495
    m = 0.282491³ = 0.022543
    s = 0.326944³ = 0.034948
  5. 5. LMS → linear sRGB

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

    R = 0.11765 × 255 = 30.00 → 30
    G = 0.16079 × 255 = 41.00 → 41
    B = 0.23138 × 255 = 59.00 → 59
  7. 7. RGB → HEX

    #1E293B

All formats

HEX
#1e293b
RGB
rgb(30 41 59)
RGB (legacy)
rgb(30, 41, 59)
HSL
hsl(217.24 32.58% 17.45%) → hsl(217 33% 17%)
HWB
hwb(217 12% 77%)
OKLCH
oklch(0.280 0.037 260.0) · oklch(28.0% 0.037 260.0)
OKLab
oklab(0.279 -0.006 -0.036)
Lab (D50)
lab(16.22 -0.48 -13.23)
LCH (D50)
lch(16.22 13.23 267.94)
Display P3
color(display-p3 0.1264 0.1595 0.2256)
Linear sRGB
color(srgb-linear 0.0130 0.0222 0.0437)

Gamut: sRGB and Display P3

#1E293B is a hex color, so it sits inside sRGB and therefore inside Display P3. At this lightness and hue, sRGB reaches chroma 0.114 and Display P3 reaches 0.144; this color uses 32% of the sRGB chroma available.

CSS snippets

.element {
  color: #1e293b;
  color: rgb(30 41 59);
  color: hsl(217 33% 17%);
  color: oklch(0.280 0.037 260.0);
}

/* Tailwind CSS v4 */
@theme {
  --color-brand: oklch(0.280 0.037 260.0);
}
/* arbitrary values */
class="text-[#1e293b] bg-[oklch(0.280_0.037_260.0)]"

/* wide-gamut screens */
@media (color-gamut: p3) {
  .element { color: color(display-p3 0.1264 0.1595 0.2256); }
}

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

  • #2D384B · oklch(0.340 0.037 260.0) · ΔL +0.06
  • #101B2C · oklch(0.220 0.037 260.0) · ΔL −0.06

Open in the studio

Other converters for this color

All converters →

Guides: What is OKLCH?