Skip to content

CSS named color

Tan #D2B48C

Tan (CSS keyword tan) has the hex code #D2B48C and the RGB value rgb(210, 180, 140): a light, muted tan.

Tan#D2B48C

Tan (#d2b48c) takes its name from tanned leather and the tanbark used in tanning. With red, it is one of the two shortest CSS color names.

Color codes for Tan

Color codes for Tan
CSS keywordtan
HEX#D2B48C
RGBrgb(210, 180, 140)
HSLhsl(34, 44%, 69%)
HWBhwb(34 55% 18%)
OKLCHoklch(78.6% 0.064 74.6)
CMYK (naive, no ICC profile)cmyk(0%, 14%, 33%, 18%)
Decimal13,808,780
Hue familyBrowns and tans

Contrast and accessibility

On tan, black text has a contrast ratio of 10.64:1 and passes AAA at any text size; white text reaches 1.97:1.

WCAG 2.2 contrast ratios (success criteria 1.4.3 and 1.4.6: AA needs 4.5:1 for normal text and 3:1 for large text, AAA needs 7:1 and 4.5:1). APCA Lc is the lightness contrast from the APCA-W3 0.0.98G model proposed for WCAG 3; a higher absolute value is more readable, and Lc 75 is its suggested minimum for body text.

Contrast and accessibility
PairRatioAAAA largeAAAAAA largeAPCA Lc
Black text on tan10.64:1PassPassPassPass65.9
White text on tan1.97:1FailFailFailFail−42.4
Tan text on white1.97:1FailFailFailFail38.0
Tan text on black10.64:1PassPassPassPass−64.4

Tints and shades

Each step mixes tan with white (tints) or black (shades) in gamma-encoded sRGB, the same result as color-mix(in srgb, tan, white 25%) in CSS.

Tints (mixed with white)

  1. 5%
    #d4b892
  2. 15%
    #d9bf9d
  3. 25%
    #ddc7a9
  4. 35%
    #e2ceb4
  5. 45%
    #e6d6c0
  6. 55%
    #ebddcb
  7. 65%
    #efe5d7
  8. 75%
    #f4ece2
  9. 85%
    #f8f4ee
  10. 95%
    #fdfbf9

Shades (mixed with black)

  1. 5%
    #c8ab85
  2. 15%
    #b39977
  3. 25%
    #9e8769
  4. 35%
    #89755b
  5. 45%
    #74634d
  6. 55%
    #5e513f
  7. 65%
    #4a3f31
  8. 75%
    #352d23
  9. 85%
    #201b15
  10. 95%
    #0b0907

Color harmonies

Rotating the hue in OKLCH while keeping lightness and chroma, tan's complementary color is #9EBCE2 (close to lightsteelblue), its analogous colors are #DDAD98 and #BFBC8D, and its triadic partners are #88C7C6 and #C9AED6. For text on top, black gives the higher contrast.

Color harmonies
HarmonyRotationColor
Complementary+180°#9ebce2
Analogous−30°, +30°#ddad98#bfbc8d
Triadic+120°, +240°#88c7c6#c9aed6
Split-complementary+150°, +210°#8dc3d8#b4b4e1

Computed in OKLCH: the hue is rotated by 180° (complementary), ±30° (analogous), ±120° (triadic) and 180° ±30° (split-complementary) while lightness and chroma stay fixed. Results that fall outside sRGB are brought back with the CSS Color 4 gamut mapping algorithm. Because this uses OKLCH, the values differ from tools that rotate hue in HSL, but every color keeps the same perceived lightness.

Warm or cool?

Tan is a warm color: its hue is 34° on the HSL wheel, in the red, orange and yellow range (0° to about 70°, plus reds above 330°) that is conventionally called warm.

Nearest named and Tailwind colors

Distance is ΔE OK, the Euclidean distance in OKLab multiplied by 100. Values under about 2 are hard to tell apart side by side.

Nearest CSS named colors

Nearest CSS named colors
ColorHEXΔE OK
burlywood#deb8872.3
darkkhaki#bdb76b5.6
sandybrown#f4a4606.7

Nearest Tailwind v4 colors

Nearest Tailwind v4 colors
ColorHEXΔE OK
olive-400#abab9c6.8
orange-300#ffb86a8.3
taupe-400#aba09c8.9

Code snippets

CSS
.element {
  color: tan;
  background-color: #d2b48c;
  border-color: rgb(210 180 140);
  outline-color: oklch(78.6% 0.064 74.6);
}
Tailwind CSS
<div class="bg-[#d2b48c] text-black">...</div>

/* or register it once in your CSS (Tailwind v4) */
@theme {
  --color-tan: #d2b48c;
}
/* then use bg-tan, text-tan, border-tan */
SwiftUI
import SwiftUI

extension Color {
  static let tan = Color(red: 0.824, green: 0.706, blue: 0.549)
}
Jetpack Compose
import androidx.compose.ui.graphics.Color

val Tan = Color(0xFFD2B48C)
Flutter
import 'package:flutter/material.dart';

const tan = Color(0xFFD2B48C);
Android XML
<!-- res/values/colors.xml -->
<color name="tan">#D2B48C</color>

Frequently asked questions

What is the hex code for tan?
The hex code for tan is #D2B48C. The same color is rgb(210, 180, 140), hsl(34, 44%, 69%) and oklch(78.6% 0.064 74.6), and in CSS you can also write the keyword tan directly.
Is tan a warm or cool color?
Tan is a warm color: its hue is 34° on the HSL wheel, in the red, orange and yellow range (0° to about 70°, plus reds above 330°) that is conventionally called warm.
What colors go with tan?
Rotating the hue in OKLCH while keeping lightness and chroma, tan's complementary color is #9EBCE2 (close to lightsteelblue), its analogous colors are #DDAD98 and #BFBC8D, and its triadic partners are #88C7C6 and #C9AED6. For text on top, black gives the higher contrast.
Can you use white text on tan?
White text on tan has a contrast ratio of 1.97:1, which fails AA even for large text under WCAG 2.2. Black text reaches 10.64:1 and passes both AA and AAA. In APCA terms that is Lc −42.4 for white and Lc 65.9 for black.
What is the RGB value of tan?
Tan is rgb(210, 180, 140): red 210, green 180 and blue 140 on the 0 to 255 scale, or 82.4%, 70.6% and 54.9%. As a decimal integer it is 13808780.

Last reviewed by Arielton Oberek.