HEX to HSL: #38BDF8

Also known as: Tailwind v3 sky-400

Result

#38BDF8 → hsl(198 93% 60%)

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. RGB ÷ 255

    R = 0.2196
    G = 0.7412
    B = 0.9725
  2. 2. max, min, Δ

    max = 0.9725
    min = 0.2196
    Δ = max − min = 0.7529
  3. 3. L

    L = (max + min) / 2 = 0.5961 = 59.61%
  4. 4. S

    S = Δ / (1 − |2L − 1|) = 0.9320 = 93.20%
  5. 5. H

    max is B → H = 60° × ((R − G) / Δ + 4) = 60° × ((0.2196 − 0.7412) / 0.7529 + 4) = 198.44°
  6. 6. HSL

    hsl(198.44 93.20% 59.61%)

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?