Brown hex code

The hex code for brown is #A52A2A, or rgb(165, 42, 42). CSS also accepts the keyword brown.

#A52A2A
HEX#A52A2A
RGBrgb(165, 42, 42)
HSLhsl(0, 59%, 41%)
HSV / HSBhsv(0, 75%, 65%)
OKLCHoklch(48.06% 0.1597 25.56)
CMYKcmyk(0%, 75%, 75%, 35%)
HEX, 50% opacity#A52A2A80
RGB, 50% opacityrgb(165 42 42 / 50%)
CSS namebrown
Defined inCSS Color 3 (from the X11 color names)

About brown

CSS brown (#A52A2A) is a fairly red brown, close to a brick color.

Yellower browns among the CSS named colors are saddlebrown (#8B4513), sienna (#A0522D), chocolate (#D2691E) and peru (#CD853F), and lighter tans include tan (#D2B48C) and burlywood (#DEB887).

Shades and tints of brown

Brown lands on the 800 step. The steps follow a lightness curve modeled on Tailwind CSS's default palette; build your own in the Tailwind color generator. For brown mixed with white, black or gray in even steps, use the tint and shade generator.

50#FFF4F2100#FFE7E4200#FFCEC7300#FFAAA1400#FF7D74500#FB5D57600#DC3739700#B62C2D800#A52A2A900#782825950#471614

Colors that go with brown

Partner hues are picked on the OKLCH color wheel at a mid lightness, because brown itself is very dark.

Complementary: the opposite hue

#A52A2A#007380

Open in the palette generator · Compare the screen and painter's complements of brown

Analogous: neighboring hues 30° either side

#A52A2A#A43067#9F4600

Open in the palette generator · See analogous and monochromatic colors of brown on three wheels

Triadic: three hues 120° apart

#A52A2A#00791E#375BBD

Open in the palette generator

Split complementary: the two hues beside the complement

#A52A2A#007860#006CA3

Open in the palette generator

Text on brown

White text on brown: 7.08:1
Black text on brown: 2.96:1
TextRatioAA normalAA largeAAA normal
White7.08:1PassPassPass
Black2.96:1FailFailFail

The ratio is the same either way round, so brown text on a white background is also 7.08:1. Check other pairs in the color contrast checker.

Similar named colors

The CSS named colors closest to brown, by deltaE OK distance.

firebrick #B22222saddlebrown #8B4513sienna #A0522Ddarkred #8B0000maroon #800000crimson #DC143C

See all 148 on the color names page.

Closest Tailwind CSS colors

orange-800 v4: orange-800, #9F2D00, deltaE OK 0.034

orange-800 v3: orange-800, #9A3412, deltaE OK 0.037

In Tailwind CSS v4 it is orange-800 (#9F2D00), and in v3 orange-800 (#9A3412). For the exact color, use an arbitrary value such as bg-[#a52a2a]. A deltaE OK of around 0.02 is roughly the smallest difference most people notice side by side. Browse every shade on the Tailwind CSS colors page.

Brown with color vision deficiency

An approximation of how brown may look with protanopia, deuteranopia and tritanopia (simulated with Machado, Oliveira and Fernandes, 2009), and with achromatopsia, shown as a gray of the same luminance.

protanopia #4E4729deuteranopia #6D6226tritanopia #B6002Cachromatopsia #585858

Test a whole palette or image in the color blindness simulator.

Using brown in code

.example {
  color: brown;                 /* named color */
  background-color: #a52a2a;  /* hex */
  border-color: rgb(165, 42, 42);
}

Frequently asked questions

What is the hex code for brown?
#A52A2A. CSS also accepts the keyword brown, which means the same color.
What is brown in RGB?
rgb(165, 42, 42). In HSL it is hsl(0, 59%, 41%), and in OKLCH oklch(48.06% 0.1597 25.56).
What text color goes on brown?
White text has the higher contrast on #A52A2A: 7.08:1, which meets AAA for all text. Black text reaches 2.96:1.
What is the closest Tailwind color to brown?
In Tailwind CSS v4 it is orange-800 (#9F2D00), and in v3 orange-800 (#9A3412). For the exact color, use an arbitrary value such as bg-[#a52a2a].
How do I make brown transparent?
Add an alpha value. Half-transparent brown is #A52A2A80 as 8-digit HEX (80 is 128 out of 255) or rgb(165 42 42 / 50%).