CSS named color

Brown #A52A2A

brown rgb(165, 42, 42)

Brown is a red with the hex code #A52A2A, which converts to rgb(165, 42, 42). Open #A52A2A in the converter to tweak it.

Brown color values

HEX#A52A2A
HEX (shorthand)—
RGBrgb(165, 42, 42)
RGBArgba(165, 42, 42, 1)
8-digit HEX#A52A2AFF
HSLhsl(0, 59%, 41%)
HSV / HSB0°, 75%, 65%
CMYK0%, 75%, 75%, 35%
RGB 0–10.647, 0.165, 0.165
Decimal10824234
CSS keywordbrown

How #A52A2A converts to RGB

Split the hex code into three pairs and read each pair as a base-16 number: A5 → 165, 2A → 42, 2A → 42. That gives rgb(165, 42, 42). The step-by-step guide explains the math.

Shades of Brown

Mixed toward black in 10% steps. Click a swatch to copy its hex.

Tints of Brown

Mixed toward white in 10% steps.

Color harmonies

Hue rotations of Brown on the HSL color wheel, keeping saturation and lightness fixed. The color harmony guide explains when each scheme works.

Complementary

Analogous

Split-complementary

Triadic

Tetradic (square)

Contrast and accessibility

TextBackgroundRatioWCAG 2.x
White Brown 7.08:1AAA
Black Brown 2.96:1Fail

Use white text on a brown background. Test any other pair in the contrast checker; thresholds are explained in the WCAG contrast guide.

Use Brown in CSS

.element {
  color: brown;                         /* keyword */
  background-color: #A52A2A;            /* hex */
  border-color: rgb(165 42 42 / 50%);    /* 50% transparent */
}

Need it semi-transparent? Append an alpha byte: #A52A2A80 is Brown at 50% opacity. See RGBA & transparency.

Similar named colors

FAQ

What is the HEX code for Brown?

The CSS named color brown is #A52A2A in hexadecimal. In CSS you can write color: brown; or color: #A52A2A; — both produce the same pixel.

What is Brown in RGB?

Brown is rgb(165, 42, 42): red 165, green 42, blue 42 on the 0–255 scale. As normalized 0–1 floats that is (0.647, 0.165, 0.165).

Is white or black text more readable on Brown?

White text is more readable. White on #A52A2A has a contrast ratio of 7.08:1 (AAA), black on #A52A2A has 2.96:1 (Fail). WCAG AA needs 4.5:1 for normal text.

Copied!