About Brown
Brown (brown) is a medium, moderately saturated red with the hex code #a52a2a, or rgb(165, 42, 42). In HSL it sits at a hue of 0°, 59% saturation and 41% lightness. It is one of the 148 named colors every browser understands, so you can write color: brown; instead of the hex value.
Using Brown for text and backgrounds
| Pairing | Contrast ratio | WCAG |
|---|---|---|
| Brown text on white | 7.08 : 1 | AAA |
| Brown text on black | 2.96 : 1 | fails |
On a brown background, use white text (7.08 : 1). WCAG asks for at least 4.5 : 1 for body text and 3 : 1 for large text. Check other pairs with the Contrast Checker.
CSS
.element {
color: brown; /* or #a52a2a */
background-color: #a52a2a;
border: 1px solid rgb(165 42 42 / 50%);
}
Similar named colors
Fire Brick (#b22222), Sienna (#a0522d), Saddle Brown (#8b4513), Crimson (#dc143c), Dark Red (#8b0000), Maroon (#800000).