Brown Hex Code #A52A2A
Brown is a dark, strong color with the hex code #A52A2A. In RGB it is 165, 42, 42, and in HSL it is 0°, 59%, 41%. It is one of the 148 named colors in CSS, so you can write “brown” instead of the hex code.
- HEX
- #A52A2A
- RGB
- rgb(165, 42, 42)
- HSL
- hsl(0, 59%, 41%)
- HSV
- hsv(0°, 75%, 65%)
- CMYK
- cmyk(0%, 75%, 75%, 35%)
- CSS name
- brown
CMYK is a simple screen-to-print estimate. Real print results depend on the printer and paper.
About Brown
On a white background Brown has a contrast ratio of 7.08:1 (AAA), and on black 2.96:1 (Fail). White text is the better choice on top of it.
It sits on the warm side of the color wheel, a range that tends to feel energetic and appears to advance toward the viewer.
Brown is earthy and warm. It suits natural, rustic and food-related designs, and works as a softer, more grounded alternative to black.
Good to know: CSS brown (#a52a2a) is a reddish brown. For warmer, more orange browns, see saddlebrown (#8b4513) and sienna (#a0522d).
Shades and tints of Brown
Tints mix Brown with white and shades mix it with black, in steps of 20%. Select a swatch to copy its hex code.
Color harmonies for Brown
These schemes are calculated from Brown on the RGB (screen) color wheel. Select a swatch to copy it, or open any scheme in the color wheel to adjust it.
On the artist’s RYB wheel, the complement of Brown is #2AA52A, close to the named color Forest Green.
Brown contrast and accessibility
WCAG asks for a contrast ratio of at least 4.5:1 for normal text and 3:1 for large text (AA), and 7:1 and 4.5:1 for AAA. This is how Brown scores against white and black.
| Against | Ratio | AA normal | AA large | AAA normal | AAA large |
|---|---|---|---|---|---|
| White (#ffffff) | 7.08:1 | ✓ Pass | ✓ Pass | ✓ Pass | ✓ Pass |
| Black (#000000) | 2.96:1 | ✕ Fail | ✕ Fail | ✕ Fail | ✕ Fail |
Brown and color blindness
These are approximate previews of how Brown can look with the main types of color vision deficiency.
Brown changes noticeably.
Brown changes noticeably.
Brown shifts slightly.
Brown changes noticeably.
Gradients with Brown
Three ready-made starting points. Copy the CSS, or open one in the generator to edit the stops and check contrast.
Brown to a lighter tint
background: linear-gradient(135deg, #a52a2a 0%, #dbaaaa 100%); Brown to its analogous neighbour
background: linear-gradient(135deg, #a52a2a 0%, #a5682a 100%); Brown to its complement
background: linear-gradient(135deg, #a52a2a 0%, #2aa5a5 100%); Colors similar to Brown
How each close match differs from Brown.
Use Brown in code
.element {
color: #a52a2a;
background-color: #a52a2a;
border-color: brown; /* brown is a valid CSS color name */
} :root {
--color-brown: #a52a2a;
} <!-- Tailwind arbitrary values -->
<div class="bg-[#a52a2a] text-[#a52a2a] border-[#a52a2a]"></div>
/* Tailwind v4 theme color */
@theme {
--color-brown: #a52a2a;
} Brown questions
What is the hex code for Brown?
The hex code for Brown is #A52A2A. In RGB that is rgb(165, 42, 42), and in HSL it is hsl(0, 59%, 41%).
What is the complementary color of Brown?
On the RGB (screen) color wheel, the complement of Brown is #2AA5A5, which is close to Light Sea Green. On the artist’s RYB wheel it is #2AA52A, close to Forest Green.
Should I use white or black text on Brown?
White text. It has a contrast ratio of 7.08:1 against Brown, which is WCAG AAA. The other option scores 2.96:1.
Is Brown accessible as a text color on white?
Yes. Brown on white scores 7.08:1, which passes WCAG AA for normal text (4.5:1) and AAA (7:1).
What are darker and lighter shades of Brown?
Mixing Brown with black gives #842222, #631919, #421111, #210808 (20% to 80% black). Mixing it with white gives #B75555, #C97F7F, #DBAAAA, #EDD4D4 (20% to 80% white).