HEX to HSL: #164E63

Also known as: Tailwind v3 cyan-900

Result

#164E63 → hsl(196 64% 24%)

Values are shown at full precision, so converting back gives exactly #164e63. 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.0863
    G = 0.3059
    B = 0.3882
  2. 2. max, min, Δ

    max = 0.3882
    min = 0.0863
    Δ = max − min = 0.3020
  3. 3. L

    L = (max + min) / 2 = 0.2373 = 23.73%
  4. 4. S

    S = Δ / (1 − |2L − 1|) = 0.6364 = 63.64%
  5. 5. H

    max is B → H = 60° × ((R − G) / Δ + 4) = 60° × ((0.0863 − 0.3059) / 0.3020 + 4) = 196.36°
  6. 6. HSL

    hsl(196.36 63.64% 23.73%)

All formats

HEX
#164e63
RGB
rgb(22 78 99)
RGB (legacy)
rgb(22, 78, 99)
HSL
hsl(196.36 63.64% 23.73%) → hsl(196 64% 24%)
HWB
hwb(196 9% 61%)
OKLCH
oklch(0.398 0.066 227.4) · oklch(39.8% 0.066 227.4)
OKLab
oklab(0.398 -0.045 -0.049)
Lab (D50)
lab(30.39 -12.66 -17.86)
LCH (D50)
lch(30.39 21.89 234.67)
Display P3
color(display-p3 0.1522 0.3014 0.3800)
Linear sRGB
color(srgb-linear 0.0080 0.0762 0.1248)

Gamut: sRGB and Display P3

#164E63 is a hex color, so it sits inside sRGB and therefore inside Display P3. At this lightness and hue, sRGB reaches chroma 0.077 and Display P3 reaches 0.102; this color uses 86% of the sRGB chroma available.

CSS snippets

.element {
  color: #164e63;
  color: rgb(22 78 99);
  color: hsl(196 64% 24%);
  color: oklch(0.398 0.066 227.4);
}

/* Tailwind CSS v4 */
@theme {
  --color-brand: oklch(0.398 0.066 227.4);
}
/* arbitrary values */
class="text-[#164e63] bg-[oklch(0.398_0.066_227.4)]"

/* wide-gamut screens */
@media (color-gamut: p3) {
  .element { color: color(display-p3 0.1522 0.3014 0.3800); }
}

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

  • #295F74 · oklch(0.458 0.066 227.4) · ΔL +0.06
  • #003E52 · oklch(0.338 0.066 227.4) · ΔL −0.06

Open in the studio

Other converters for this color

All converters →

Guides: What is OKLCH?