Brown Color Code: Hex #A52A2A
The hex code for Brown is #A52A2A (the CSS keyword brown). Brown RGB code: rgb(165, 42, 42). The xkcd color survey gives #653700 instead, which looks clearly different; both codes are below with their source.
#A52A2ATop: the code browsers use#653700Below: compare edge to edgeBrown color codes: each Brown hex code in every format
Sources
Properties
- Hex codes
- 2 different ones in 3 color lists; they look clearly different
- Family
- brown
- Contrast
- 7.08:1 with white, 2.96:1 with black
- CSS keyword
- brown
- Character
- dark, vivid
- Readable text on it
- white (AA)
The word comes from Old English brún, first used for any dusky or dark shade; it is recorded as a color name in English from about the year 1000. The web keyword brown is a dark red; the color traditionally called brown is a darker orange, and the traditional name for the web shade is red-brown, recorded as a color name from 1682.
A dark, vivid red with a warm cast. In code, brown gives exactly this web value. If you mean the color as people usually picture the name, the survey value #653700 is closer: it is darker and more muted.
White text reads best on it; black text does not pass WCAG AA. Its exact opposite on the color wheel cannot be shown on screens, so the complementary palette uses the closest displayable version. Even pale tints keep its hue, which makes it easy to use for soft backgrounds. Next to Firebrick, its closest named neighbour, it looks about as light, more muted and cooler; beside Cherry it looks darker, more muted and cooler. It is one of the darkest of the brown family here.
Colors that go with Brown
Complementary: the opposite of Brown
#A52A2AWhite text 7.08:1#006B74White text 6.26:1#D48D87Black text 7.96:1#003F45White text 11.69:1
Analogous
#9E2961White text 7.13:1#A52A2AWhite text 7.08:1#8F4800White text 6.79:1#E2ACA6Black text 10.69:1
Triadic
#A52A2AWhite text 7.08:1#00721FWhite text 6.13:1#3255B6White text 6.75:1#EECBC7Black text 14.00:1
Monochrome
#2B0505White text 18.64:1#651616White text 12.50:1#A52A2AWhite text 7.08:1#C66F67Black text 5.87:1#E2ACA6Black text 10.69:1
With neutrals
#A52A2AWhite text 7.08:1#EECBC7Black text 14.00:1#120101White text 20.38:1#906B67White text 4.68:1
Preview
Heading on Brown
Body text on this color, 7.08:1.
ButtonHeading in Brown
Text in this color on white, 7.08:1.
ButtonTints and shades
#EECBC7#E2ACA6#D48D87#C66F67#B64F49#A52A2A#842020#651616#470D0D#2B0505#120101
WhiteBrownBlack
Similar named colors
Where the name comes from
- Source: Wikipedia, “Brown” (checked 2 Nov 2026)
- Source: Wikipedia, “Shades of brown” (checked 2 Nov 2026)
- Listed in CSS Color 4, xkcd color survey, meodai color-name-list. About these lists.
Try it: