Brown
Brown is a medium, rich color from the red family. Hex code #A52A2A.
Color codes
- CSS name
brown - HEX
#A52A2A - RGB
rgb(165 42 42) - HSL
hsl(0 59% 41%) - HSB / HSV
hsb(0, 75%, 65%) - OKLCH
oklch(48.1% 0.16 25.6) - CMYK
cmyk(0%, 75%, 75%, 35%)
White text
7.08:1 · passes WCAG AAA
Black text
2.96:1 · fails WCAG
Shades
Complementary
Analogous
Triadic
About this color
Brown in CSS and design
Brown is a medium, rich color from the red family. Brown is one of the extended color keywords, which CSS adopted from the X11 color names used on Unix workstations.
Use it in CSS by name or by any of its codes; these all give the same color:
color: brown;
color: #A52A2A;
color: rgb(165 42 42);
color: hsl(0 59% 41%);For text on brown, white reads best. Check other combinations with the contrast checker, or browse all CSS color names.
More tools
Work with this color
- Color picker and converterPick a color and get HEX, RGB, HSL, HSB, CMYK and OKLCH, plus shades and harmonies.
- Contrast checkerCheck text and background colors against WCAG AA and AAA, and fix failing ones.
- CSS color namesAll 148 named colors with hex codes, shades, contrast and matching palettes.
- Palette generatorBuild a color palette from harmony rules, with shades and CSS variables.
Frequently asked questions
What is the hex code for brown?
#A52A2A. In CSS you can also use the keyword brown, which works in every browser.
What is brown in RGB and HSL?
In RGB it is rgb(165 42 42), in HSL hsl(0 59% 41%). For print, cmyk(0%, 75%, 75%, 35%) is a starting point, but CMYK depends on paper and ink, so check with your printer.
Should I use black or white text on brown?
White text works better: it has a contrast ratio of 7.08:1 and passes WCAG AAA. Black text reaches 2.96:1.
Which colors go with brown?
Its complementary color is #156A73, on the opposite side of the color wheel. For a calmer look, combine it with its analogous neighbors #9E2961 and #8E4904. The palette generator builds more combinations.