HSL to HEX: #1C398E

Also known as: Tailwind blue-900

Result

hsl(224.74 67.06% 33.33%) → #1C398E

Values are shown at full precision, so converting back gives exactly #1c398e. 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.74°, S = 67.06%, L = 33.33%
  2. 2. C

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

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

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

    (R′, G′, B′) = (0.00000, 0.11369, 0.44702)
    R = round((0.00000 + 0.10979) × 255) = 28
    G = round((0.11369 + 0.10979) × 255) = 57
    B = round((0.44702 + 0.10979) × 255) = 142
  6. 6. RGB → HEX

    #1C398E

All formats

HEX
#1c398e
RGB
rgb(28 57 142)
RGB (legacy)
rgb(28, 57, 142)
HSL
hsl(224.74 67.06% 33.33%) → hsl(225 67% 33%)
HWB
hwb(225 11% 44%)
OKLCH
oklch(0.380 0.145 265.5) · oklch(38.0% 0.145 265.5)
OKLab
oklab(0.380 -0.011 -0.145)
Lab (D50)
lab(26.25 15.50 -51.29)
LCH (D50)
lch(26.25 53.58 286.81)
Display P3
color(display-p3 0.1373 0.2208 0.5366)
Linear sRGB
color(srgb-linear 0.0116 0.0409 0.2705)

Gamut: sRGB and Display P3

#1C398E is a hex color, so it sits inside sRGB and therefore inside Display P3. At this lightness and hue, sRGB reaches chroma 0.259 and Display P3 reaches 0.260; this color uses 56% of the sRGB chroma available.

CSS snippets

.element {
  color: #1c398e;
  color: rgb(28 57 142);
  color: hsl(225 67% 33%);
  color: oklch(0.380 0.145 265.5);
}

/* Tailwind CSS v4 */
@theme {
  --color-brand: oklch(0.380 0.145 265.5);
}
/* arbitrary values */
class="text-[#1c398e] bg-[oklch(0.380_0.145_265.5)]"

/* wide-gamut screens */
@media (color-gamut: p3) {
  .element { color: color(display-p3 0.1373 0.2208 0.5366); }
}

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

  • #2B4BA1 · oklch(0.440 0.145 265.5) · ΔL +0.06
  • #0E277B · oklch(0.320 0.145 265.5) · ΔL −0.06

Open in the studio

Other converters for this color

All converters →

Guides: What is OKLCH?