HEX to HSL: #9F9FA9

Also known as: Tailwind zinc-400

Result

#9F9FA9 → hsl(240 5% 64%)

Values are shown at full precision, so converting back gives exactly #9f9fa9. 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.6235
    G = 0.6235
    B = 0.6627
  2. 2. max, min, Δ

    max = 0.6627
    min = 0.6235
    Δ = max − min = 0.0392
  3. 3. L

    L = (max + min) / 2 = 0.6431 = 64.31%
  4. 4. S

    S = Δ / (1 − |2L − 1|) = 0.0549 = 5.49%
  5. 5. H

    max is B → H = 60° × ((R − G) / Δ + 4) = 60° × ((0.6235 − 0.6235) / 0.0392 + 4) = 240.00°
  6. 6. HSL

    hsl(240.00 5.49% 64.31%)

All formats

HEX
#9f9fa9
RGB
rgb(159 159 169)
RGB (legacy)
rgb(159, 159, 169)
HSL
hsl(240.00 5.49% 64.31%) → hsl(240 5% 64%)
HWB
hwb(240 62% 34%)
OKLCH
oklch(0.706 0.014 286.0) · oklch(70.6% 0.014 286.0)
OKLab
oklab(0.706 0.004 -0.014)
Lab (D50)
lab(65.73 1.47 -5.21)
LCH (D50)
lch(65.73 5.42 285.73)
Display P3
color(display-p3 0.6235 0.6235 0.6594)
Linear sRGB
color(srgb-linear 0.3467 0.3467 0.3968)

Gamut: sRGB and Display P3

#9F9FA9 is a hex color, so it sits inside sRGB and therefore inside Display P3. At this lightness and hue, sRGB reaches chroma 0.162 and Display P3 reaches 0.176; this color uses 9% of the sRGB chroma available.

CSS snippets

.element {
  color: #9f9fa9;
  color: rgb(159 159 169);
  color: hsl(240 5% 64%);
  color: oklch(0.706 0.014 286.0);
}

/* Tailwind CSS v4 */
@theme {
  --color-brand: oklch(0.706 0.014 286.0);
}
/* arbitrary values */
class="text-[#9f9fa9] bg-[oklch(0.706_0.014_286.0)]"

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

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

  • #B2B2BC · oklch(0.766 0.014 286.0) · ΔL +0.06
  • #8D8D97 · oklch(0.646 0.014 286.0) · ΔL −0.06

Open in the studio

Other converters for this color

All converters →

Guides: What is OKLCH?