HSL to HEX: #38BDF8

Also known as: Tailwind v3 sky-400

Result

hsl(198.44 93.20% 59.61%) → #38BDF8

Values are shown at full precision, so converting back gives exactly #38bdf8. 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 = 198.44°, S = 93.20%, L = 59.61%
  2. 2. C

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

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

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

    (R′, G′, B′) = (0.00000, 0.52149, 0.75287)
    R = round((0.00000 + 0.21967) × 255) = 56
    G = round((0.52149 + 0.21967) × 255) = 189
    B = round((0.75287 + 0.21967) × 255) = 248
  6. 6. RGB → HEX

    #38BDF8

All formats

HEX
#38bdf8
RGB
rgb(56 189 248)
RGB (legacy)
rgb(56, 189, 248)
HSL
hsl(198.44 93.20% 59.61%) → hsl(198 93% 60%)
HWB
hwb(198 22% 3%)
OKLCH
oklch(0.754 0.139 232.7) · oklch(75.4% 0.139 232.7)
OKLab
oklab(0.754 -0.084 -0.111)
Lab (D50)
lab(71.59 -21.72 -40.13)
LCH (D50)
lch(71.59 45.63 241.58)
Display P3
color(display-p3 0.3854 0.7309 0.9510)
Linear sRGB
color(srgb-linear 0.0395 0.5089 0.9387)

Gamut: sRGB and Display P3

#38BDF8 is a hex color, so it sits inside sRGB and therefore inside Display P3. At this lightness and hue, sRGB reaches chroma 0.153 and Display P3 reaches 0.165; this color uses 91% of the sRGB chroma available.

CSS snippets

.element {
  color: #38bdf8;
  color: rgb(56 189 248);
  color: hsl(198 93% 60%);
  color: oklch(0.754 0.139 232.7);
}

/* Tailwind CSS v4 */
@theme {
  --color-brand: oklch(0.754 0.139 232.7);
}
/* arbitrary values */
class="text-[#38bdf8] bg-[oklch(0.754_0.139_232.7)]"

/* wide-gamut screens */
@media (color-gamut: p3) {
  .element { color: color(display-p3 0.3854 0.7309 0.9510); }
}

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

  • #51D1FF · oklch(0.814 0.139 232.7) · ΔL +0.06
  • #15AAE4 · oklch(0.694 0.139 232.7) · ΔL −0.06

Open in the studio

Other converters for this color

All converters →

Guides: What is OKLCH?