HEX to RGB: #172554

Also known as: Tailwind v3 blue-950

Result

#172554 → rgb(23 37 84)

Values are shown at full precision, so converting back gives exactly #172554. 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. HEX → pairs

    #172554 → 17 | 25 | 54
  2. 2. base 16 → base 10

    R = 17₁₆ = 1×16 + 7 = 23
    G = 25₁₆ = 2×16 + 5 = 37
    B = 54₁₆ = 5×16 + 4 = 84
  3. 3. RGB

    rgb(23 37 84)

All formats

HEX
#172554
RGB
rgb(23 37 84)
RGB (legacy)
rgb(23, 37, 84)
HSL
hsl(226.23 57.01% 20.98%) → hsl(226 57% 21%)
HWB
hwb(226 9% 67%)
OKLCH
oklch(0.282 0.087 267.9) · oklch(28.2% 0.087 267.9)
OKLab
oklab(0.282 -0.003 -0.087)
Lab (D50)
lab(15.77 8.12 -31.06)
LCH (D50)
lch(15.77 32.10 284.65)
Display P3
color(display-p3 0.1020 0.1436 0.3175)
Linear sRGB
color(srgb-linear 0.0086 0.0185 0.0887)

Gamut: sRGB and Display P3

#172554 is a hex color, so it sits inside sRGB and therefore inside Display P3. At this lightness and hue, sRGB reaches chroma 0.188 and Display P3 reaches 0.189; this color uses 46% of the sRGB chroma available.

CSS snippets

.element {
  color: #172554;
  color: rgb(23 37 84);
  color: hsl(226 57% 21%);
  color: oklch(0.282 0.087 267.9);
}

/* Tailwind CSS v4 */
@theme {
  --color-brand: oklch(0.282 0.087 267.9);
}
/* arbitrary values */
class="text-[#172554] bg-[oklch(0.282_0.087_267.9)]"

/* wide-gamut screens */
@media (color-gamut: p3) {
  .element { color: color(display-p3 0.1020 0.1436 0.3175); }
}

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

  • #253565 · oklch(0.342 0.087 267.9) · ΔL +0.06
  • #0A1543 · oklch(0.222 0.087 267.9) · ΔL −0.06

Open in the studio

Other converters for this color

All converters →

Guides: What is OKLCH?