RGB to HEX: #0F172B
Also known as: Tailwind slate-900
Result
rgb(15 23 43) → #0F172B
Values are shown at full precision, so converting back gives exactly #0f172b. 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. base 10 → base 16
R = 15 = 0×16 + 15 → 0F G = 23 = 1×16 + 7 → 17 B = 43 = 2×16 + 11 → 2B
2. pairs → HEX
0F 17 2B → #0F172B
All formats
- HEX
- #0f172b
- RGB
- rgb(15 23 43)
- RGB (legacy)
- rgb(15, 23, 43)
- HSL
- hsl(222.86 48.28% 11.37%) → hsl(223 48% 11%)
- HWB
- hwb(223 6% 83%)
- OKLCH
- oklch(0.208 0.042 266.4) · oklch(20.8% 0.042 266.4)
- OKLab
- oklab(0.208 -0.003 -0.042)
- Lab (D50)
- lab(7.83 1.92 -14.95)
- LCH (D50)
- lch(7.83 15.07 277.33)
- Display P3
- color(display-p3 0.0653 0.0893 0.1629)
- Linear sRGB
- color(srgb-linear 0.0048 0.0086 0.0242)
Gamut: sRGB and Display P3
#0F172B is a hex color, so it sits inside sRGB and therefore inside Display P3. At this lightness and hue, sRGB reaches chroma 0.141 and Display P3 reaches 0.141; this color uses 30% of the sRGB chroma available.
CSS snippets
.element {
color: #0f172b;
color: rgb(15 23 43);
color: hsl(223 48% 11%);
color: oklch(0.208 0.042 266.4);
}
/* Tailwind CSS v4 */
@theme {
--color-brand: oklch(0.208 0.042 266.4);
}
/* arbitrary values */
class="text-[#0f172b] bg-[oklch(0.208_0.042_266.4)]"
/* wide-gamut screens */
@media (color-gamut: p3) {
.element { color: color(display-p3 0.0653 0.0893 0.1629); }
}
/* relative color syntax: 10% darker */
.element-dark { color: oklch(from #0f172b calc(l - 0.1) c h); }Nearby colors
Closest colors in the Tailwind and CSS named palettes (OKLab distance).
- v3 slate-900#0F172A
- gray-900#101828
- v3 gray-900#111827
- mauve-900#1D161E
- zinc-900#18181B
- mist-900#161B1D
- neutral-900#171717
- stone-900#1C1917
Lighter and darker, same hue and chroma
- #1D253B · oklch(0.268 0.042 266.4) · ΔL +0.06
- #04091C · oklch(0.148 0.042 266.4) · ΔL −0.06
Open in the studio
Other converters for this color
Guides: What is OKLCH?