HEX to HSL: #1D293D

Also known as: Tailwind slate-800

Result

#1D293D → hsl(218 36% 18%)

Values are shown at full precision, so converting back gives exactly #1d293d. 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. RGB ÷ 255

    R = 0.1137
    G = 0.1608
    B = 0.2392
  2. 2. max, min, Δ

    max = 0.2392
    min = 0.1137
    Δ = max − min = 0.1255
  3. 3. L

    L = (max + min) / 2 = 0.1765 = 17.65%
  4. 4. S

    S = Δ / (1 − |2L − 1|) = 0.3556 = 35.56%
  5. 5. H

    max is B → H = 60° × ((R − G) / Δ + 4) = 60° × ((0.1137 − 0.1608) / 0.1255 + 4) = 217.50°
  6. 6. HSL

    hsl(217.50 35.56% 17.65%)

All formats

HEX
#1d293d
RGB
rgb(29 41 61)
RGB (legacy)
rgb(29, 41, 61)
HSL
hsl(217.50 35.56% 17.65%) → hsl(218 36% 18%)
HWB
hwb(218 11% 76%)
OKLCH
oklch(0.280 0.041 260.3) · oklch(28.0% 0.041 260.3)
OKLab
oklab(0.280 -0.007 -0.040)
Lab (D50)
lab(16.23 -0.26 -14.60)
LCH (D50)
lch(16.23 14.60 268.96)
Display P3
color(display-p3 0.1234 0.1594 0.2329)
Linear sRGB
color(srgb-linear 0.0123 0.0222 0.0467)

Gamut: sRGB and Display P3

#1D293D is a hex color, so it sits inside sRGB and therefore inside Display P3. At this lightness and hue, sRGB reaches chroma 0.116 and Display P3 reaches 0.146; this color uses 35% of the sRGB chroma available.

CSS snippets

.element {
  color: #1d293d;
  color: rgb(29 41 61);
  color: hsl(218 36% 18%);
  color: oklch(0.280 0.041 260.3);
}

/* Tailwind CSS v4 */
@theme {
  --color-brand: oklch(0.280 0.041 260.3);
}
/* arbitrary values */
class="text-[#1d293d] bg-[oklch(0.280_0.041_260.3)]"

/* wide-gamut screens */
@media (color-gamut: p3) {
  .element { color: color(display-p3 0.1234 0.1594 0.2329); }
}

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

  • #2C384D · oklch(0.340 0.041 260.3) · ΔL +0.06
  • #0F1A2D · oklch(0.220 0.041 260.3) · ΔL −0.06

Open in the studio

Other converters for this color

All converters →

Guides: What is OKLCH?