HSL to HEX: #0C4A6E

Also known as: Tailwind v3 sky-900

Result

hsl(202.04 80.33% 23.92%) → #0C4A6E

Values are shown at full precision, so converting back gives exactly #0c4a6e. 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 = 202.04°, S = 80.33%, L = 23.92%
  2. 2. C

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

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

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

    (R′, G′, B′) = (0.00000, 0.24313, 0.38430)
    R = round((0.00000 + 0.04705) × 255) = 12
    G = round((0.24313 + 0.04705) × 255) = 74
    B = round((0.38430 + 0.04705) × 255) = 110
  6. 6. RGB → HEX

    #0C4A6E

All formats

HEX
#0c4a6e
RGB
rgb(12 74 110)
RGB (legacy)
rgb(12, 74, 110)
HSL
hsl(202.04 80.33% 23.92%) → hsl(202 80% 24%)
HWB
hwb(202 5% 57%)
OKLCH
oklch(0.391 0.085 240.9) · oklch(39.1% 0.085 240.9)
OKLab
oklab(0.391 -0.041 -0.074)
Lab (D50)
lab(29.25 -8.24 -26.58)
LCH (D50)
lch(29.25 27.83 252.77)
Display P3
color(display-p3 0.1293 0.2856 0.4196)
Linear sRGB
color(srgb-linear 0.0037 0.0685 0.1559)

Gamut: sRGB and Display P3

#0C4A6E is a hex color, so it sits inside sRGB and therefore inside Display P3. At this lightness and hue, sRGB reaches chroma 0.091 and Display P3 reaches 0.119; this color uses 93% of the sRGB chroma available.

CSS snippets

.element {
  color: #0c4a6e;
  color: rgb(12 74 110);
  color: hsl(202 80% 24%);
  color: oklch(0.391 0.085 240.9);
}

/* Tailwind CSS v4 */
@theme {
  --color-brand: oklch(0.391 0.085 240.9);
}
/* arbitrary values */
class="text-[#0c4a6e] bg-[oklch(0.391_0.085_240.9)]"

/* wide-gamut screens */
@media (color-gamut: p3) {
  .element { color: color(display-p3 0.1293 0.2856 0.4196); }
}

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

  • #225B80 · oklch(0.451 0.085 240.9) · ΔL +0.06
  • #003A5C · oklch(0.331 0.085 240.9) · ΔL −0.06

Open in the studio

Other converters for this color

All converters →

Guides: What is OKLCH?