HSL to HEX: #030712

Also known as: Tailwind gray-950, Tailwind v3 gray-950

Result

hsl(224.00 71.43% 4.12%) → #030712

Values are shown at full precision, so converting back gives exactly #030712. 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

    H = 224.00°, S = 71.43%, L = 4.12%
  2. 2. C

    C = (1 − |2L − 1|) × S = 0.05886
  3. 3. X

    X = C × (1 − |(H / 60°) mod 2 − 1|) = 0.01570   (H / 60° = 3.7333, sector 3)
  4. 4. m

    m = L − C / 2 = 0.01177
  5. 5. (R′, G′, B′) + m

    (R′, G′, B′) = (0.00000, 0.01570, 0.05886)
    R = round((0.00000 + 0.01177) × 255) = 3
    G = round((0.01570 + 0.01177) × 255) = 7
    B = round((0.05886 + 0.01177) × 255) = 18
  6. 6. RGB → HEX

    #030712

All formats

HEX
#030712
RGB
rgb(3 7 18)
RGB (legacy)
rgb(3, 7, 18)
HSL
hsl(224.00 71.43% 4.12%) → hsl(224 71% 4%)
HWB
hwb(224 1% 93%)
OKLCH
oklch(0.130 0.027 261.7) · oklch(13.0% 0.027 261.7)
OKLab
oklab(0.130 -0.004 -0.027)
Lab (D50)
lab(1.89 0.25 -5.31)
LCH (D50)
lch(1.89 5.31 272.75)
Display P3
color(display-p3 0.0145 0.0269 0.0673)
Linear sRGB
color(srgb-linear 0.0009 0.0021 0.0060)

Gamut: sRGB and Display P3

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

CSS snippets

.element {
  color: #030712;
  color: rgb(3 7 18);
  color: hsl(224 71% 4%);
  color: oklch(0.130 0.027 261.7);
}

/* Tailwind CSS v4 */
@theme {
  --color-brand: oklch(0.130 0.027 261.7);
}
/* arbitrary values */
class="text-[#030712] bg-[oklch(0.130_0.027_261.7)]"

/* wide-gamut screens */
@media (color-gamut: p3) {
  .element { color: color(display-p3 0.0145 0.0269 0.0673); }
}

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

  • #0D1420 · oklch(0.190 0.027 261.7) · ΔL +0.06
  • #000106 · oklch(0.070 0.027 261.7) · ΔL −0.06

Open in the studio

Other converters for this color

All converters →

Guides: What is OKLCH?