Skip to content
Let’s chat ↗

THE COLOR LIBRARY / Warm

Brown color codes.

The CSS brown color code is #A52A2A. Its RGB value is rgb(165, 42, 42) and its HSL value is hsl(0, 59.42%, 40.59%). Start with the exact reference, then choose a shade for the job.

A color name describes a family in everyday language. This page uses the standardized CSS keyword as its reference; your brand’s brown may be different.

Explore the shades ↓
CSS / brownBrown#A52A2A

COPY. PASTE. MAKE IT YOURS.

Brown in HEX, RGB, and HSL

HEX#A52A2A
RGBrgb(165, 42, 42)
HSLhsl(0, 59.42%, 40.59%)

HEX and RGB encode the same sRGB reference. HSL is calculated from it and rounded to two decimals for display. These are screen color values, not a CMYK print specification.

ONE COLOR. DIFFERENT ROLES.

Explore brown tints and shades

Select a swatch to see its codes and compare text contrast.

UI COLOR SPECIMEN

Make the next step clear.

A label, a surface, and room to breathe.

Selected: Reference

Selected color

Reference · #A52A2A

rgb(165, 42, 42)hsl(0, 59.42%, 40.59%)

The specimen picks whichever of black or white has higher contrast. It demonstrates a pair, not a complete accessible component.

Illustrative scale: tints mix the reference with white, shades with black, by the stated percentage in encoded sRGB channels. This is not a perceptually uniform scale. Black tints and white shades remain useful; mixing black with black or white with white repeats the reference.

Text contrast on brown

The table follows your selected swatch, currently #A52A2A. Decisions use the full calculated ratio; displayed ratios are rounded.

Text against the selected brown surface
Text colorRatioAA ordinary textAA large text
Black #0000002.96:1Fail · 4.5:1Fail · 3:1
White #FFFFFF7.08:1Pass · 4.5:1Pass · 3:1

Large text is at least 18pt, or 14pt bold. These numeric checks apply to opaque, solid color pairs. Other criteria, states, backgrounds, and exceptions need review. Read W3C’s contrast guidance.

The CSS brown keyword is #A52A2A, not a generic earth-tone palette. Inspect the chosen shade beside red error tokens before assigning it a UI role.

Check a custom color pair ↗

IN A REAL INTERFACE

How to use brown in product design

Give it one clear role

Brown can support a warm brand accent or a category treatment alongside neutral surfaces. Its reddish CSS reference can compete with error styling, so document the difference clearly.

A UI example to try

An inventory category can use a brown label next to a category name. Keep stock warnings tied to explicit status text and a separate semantic palette.

Work through a real screen

Try brown as a text or accent role on a light warm surface, using a paragraph, label, and action together. Check whether the hierarchy remains clear beside black or dark-gray content. If brown is part of the brand, reserve stronger emphasis for the decisions users need to make.

Compare nearby colors by purpose

Compare brown with navy or gray when choosing a dark supporting color. The choice can affect brand voice, but it does not establish trust or usability on its own. Review the interface with the intended audience and actual content.

  1. Choose the role. Decide whether brown is a surface, foreground, accent, or status. Name the semantic token after that purpose.
  2. Test the actual pair. Compare its foreground and background at the intended size. Test hover, selected, focus, and supported themes independently.
  3. Document the decision. Keep the approved code, usage rule, and contrasting companion together. Preserve labels and non-color cues when communicating a state.

Copy a brown CSS palette

These numeric names are illustrative palette tokens, not a standard scale. Connect approved values to semantic tokens such as --surface-highlight or --text-primary after testing their pairs.

:root {
  --brown-100: #EDD4D4;
  --brown-300: #C97F7F;
  --brown-500: #A52A2A;
  --brown-700: #7C2020;
  --brown-900: #531515;
}
Download CSS palette ↓

Turn palette values into semantic tokens ↗

Common questions about brown

What is the HEX code for brown?

The CSS named color brown is #A52A2A. Use that exact value when you want the standardized reference; use your own documented token when you mean a particular brand shade.

Is brown accessible?

A color by itself cannot pass or fail accessibility. The foreground/background pair, content size, interaction state, and meaning all matter. Use the table above for the selected solid-color pair, then review the complete interface.

Explore related colors