RGB to HEX: #7E2A0C
Also known as: Tailwind orange-900
Result
rgb(126 42 12) → #7E2A0C
Values are shown at full precision, so converting back gives exactly #7e2a0c. 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 = 126 = 7×16 + 14 → 7E G = 42 = 2×16 + 10 → 2A B = 12 = 0×16 + 12 → 0C
2. pairs → HEX
7E 2A 0C → #7E2A0C
All formats
- HEX
- #7e2a0c
- RGB
- rgb(126 42 12)
- RGB (legacy)
- rgb(126, 42, 12)
- HSL
- hsl(15.79 82.61% 27.06%) → hsl(16 83% 27%)
- HWB
- hwb(16 5% 51%)
- OKLCH
- oklch(0.407 0.123 38.0) · oklch(40.7% 0.123 38.0)
- OKLab
- oklab(0.407 0.097 0.076)
- Lab (D50)
- lab(30.22 36.03 37.43)
- LCH (D50)
- lch(30.22 51.96 46.09)
- Display P3
- color(display-p3 0.4562 0.1874 0.0903)
- Linear sRGB
- color(srgb-linear 0.2086 0.0232 0.0037)
Gamut: sRGB and Display P3
#7E2A0C is a hex color, so it sits inside sRGB and therefore inside Display P3. At this lightness and hue, sRGB reaches chroma 0.133 and Display P3 reaches 0.150; this color uses 92% of the sRGB chroma available.
CSS snippets
.element {
color: #7e2a0c;
color: rgb(126 42 12);
color: hsl(16 83% 27%);
color: oklch(0.407 0.123 38.0);
}
/* Tailwind CSS v4 */
@theme {
--color-brand: oklch(0.407 0.123 38.0);
}
/* arbitrary values */
class="text-[#7e2a0c] bg-[oklch(0.407_0.123_38.0)]"
/* wide-gamut screens */
@media (color-gamut: p3) {
.element { color: color(display-p3 0.4562 0.1874 0.0903); }
}
/* relative color syntax: 10% darker */
.element-dark { color: oklch(from #7e2a0c calc(l - 0.1) c h); }Nearby colors
Closest colors in the Tailwind and CSS named palettes (OKLab distance).
- v3 orange-900#7C2D12
- amber-900#7B3306
- v3 amber-900#78350F
- v3 red-900#7F1D1D
- red-900#82181A
- darkred#8B0000
- yellow-900#733E0A
- maroon#800000
Lighter and darker, same hue and chroma
- #913C20 · oklch(0.467 0.123 38.0) · ΔL +0.06
- #6B1700 · oklch(0.347 0.123 38.0) · ΔL −0.06
Open in the studio
Other converters for this color
Guides: What is OKLCH?