HSL to HEX: #1D4ED8

Also known as: Tailwind v3 blue-700

Result

hsl(224.28 76.33% 48.04%) → #1D4ED8

Values are shown at full precision, so converting back gives exactly #1d4ed8. 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.28°, S = 76.33%, L = 48.04%
  2. 2. C

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

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

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

    (R′, G′, B′) = (0.00000, 0.19215, 0.73338)
    R = round((0.00000 + 0.11371) × 255) = 29
    G = round((0.19215 + 0.11371) × 255) = 78
    B = round((0.73338 + 0.11371) × 255) = 216
  6. 6. RGB → HEX

    #1D4ED8

All formats

HEX
#1d4ed8
RGB
rgb(29 78 216)
RGB (legacy)
rgb(29, 78, 216)
HSL
hsl(224.28 76.33% 48.04%) → hsl(224 76% 48%)
HWB
hwb(224 11% 15%)
OKLCH
oklch(0.488 0.217 264.4) · oklch(48.8% 0.217 264.4)
OKLab
oklab(0.488 -0.021 -0.216)
Lab (D50)
lab(37.66 27.02 -76.50)
LCH (D50)
lch(37.66 81.13 289.45)
Display P3
color(display-p3 0.1666 0.3017 0.8158)
Linear sRGB
color(srgb-linear 0.0123 0.0762 0.6867)

Gamut: sRGB and Display P3

#1D4ED8 is a hex color, so it sits inside sRGB and therefore inside Display P3. At this lightness and hue, sRGB reaches chroma 0.289 and Display P3 reaches 0.308; this color uses 75% of the sRGB chroma available.

CSS snippets

.element {
  color: #1d4ed8;
  color: rgb(29 78 216);
  color: hsl(224 76% 48%);
  color: oklch(0.488 0.217 264.4);
}

/* Tailwind CSS v4 */
@theme {
  --color-brand: oklch(0.488 0.217 264.4);
}
/* arbitrary values */
class="text-[#1d4ed8] bg-[oklch(0.488_0.217_264.4)]"

/* wide-gamut screens */
@media (color-gamut: p3) {
  .element { color: color(display-p3 0.1666 0.3017 0.8158); }
}

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

  • #2D62ED · oklch(0.548 0.217 264.4) · ΔL +0.06
  • #0D39C3 · oklch(0.428 0.217 264.4) · ΔL −0.06

Open in the studio

Other converters for this color

All converters →

Guides: What is OKLCH?