Skip to content

CSS named color

Goldenrod #DAA520

Goldenrod (CSS keyword goldenrod) has the hex code #DAA520 and the RGB value rgb(218, 165, 32): a light, moderately saturated amber.

Goldenrod#DAA520

Named after goldenrod (Solidago), a plant with dense yellow flower spikes. It is a warm mustard yellow, darker and more orange than gold.

Color codes for Goldenrod

Color codes for Goldenrod
CSS keywordgoldenrod
HEX#DAA520
RGBrgb(218, 165, 32)
HSLhsl(43, 74%, 49%)
HWBhwb(43 13% 15%)
OKLCHoklch(75.2% 0.147 84)
CMYK (naive, no ICC profile)cmyk(0%, 24%, 85%, 15%)
Decimal14,329,120
Hue familyBrowns and tans

Contrast and accessibility

On goldenrod, black text has a contrast ratio of 9.38:1 and passes AAA at any text size; white text reaches 2.23: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 goldenrod9.38:1PassPassPassPass60.1
White text on goldenrod2.23:1FailFailFailFail−48.7
Goldenrod text on white2.23:1FailFailFailFail43.9
Goldenrod text on black9.38:1PassPassPassPass−58.3

Tints and shades

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

Tints (mixed with white)

  1. 5%
    #dcaa2b
  2. 15%
    #e0b341
  3. 25%
    #e3bc58
  4. 35%
    #e7c56e
  5. 45%
    #ebce84
  6. 55%
    #eed79b
  7. 65%
    #f2e0b1
  8. 75%
    #f6e9c7
  9. 85%
    #f9f2de
  10. 95%
    #fdfbf4

Shades (mixed with black)

  1. 5%
    #cf9d1e
  2. 15%
    #b98c1b
  3. 25%
    #a47c18
  4. 35%
    #8e6b15
  5. 45%
    #785b12
  6. 55%
    #624a0e
  7. 65%
    #4c3a0b
  8. 75%
    #372908
  9. 85%
    #211905
  10. 95%
    #0b0802

Color harmonies

Rotating the hue in OKLCH while keeping lightness and chroma, goldenrod's complementary color is #7EACFF (close to cornflowerblue), its analogous colors are #F5924B and #AEB839, and its triadic partners are #00C8D9 and #DC8CE3. For text on top, black gives the higher contrast.

Color harmonies
HarmonyRotationColor
Complementary+180°#7eacff
Analogous−30°, +30°#f5924b#aeb839
Triadic+120°, +240°#00c8d9#dc8ce3
Split-complementary+150°, +210°#2cbcfd#b49aff

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?

Goldenrod is a warm color: its hue is 43° 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
orange#ffa5006.0
darkkhaki#bdb76b6.7
sandybrown#f4a4606.9

Nearest Tailwind v4 colors

Nearest Tailwind v4 colors
ColorHEXΔE OK
yellow-500#efb1005.7
amber-500#fd9a006.0
yellow-600#d087007.5

Code snippets

CSS
.element {
  color: goldenrod;
  background-color: #daa520;
  border-color: rgb(218 165 32);
  outline-color: oklch(75.2% 0.147 84);
}
Tailwind CSS
<div class="bg-[#daa520] text-black">...</div>

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

extension Color {
  static let goldenrod = Color(red: 0.855, green: 0.647, blue: 0.125)
}
Jetpack Compose
import androidx.compose.ui.graphics.Color

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

const goldenrod = Color(0xFFDAA520);
Android XML
<!-- res/values/colors.xml -->
<color name="goldenrod">#DAA520</color>

Frequently asked questions

What is the hex code for goldenrod?
The hex code for goldenrod is #DAA520. The same color is rgb(218, 165, 32), hsl(43, 74%, 49%) and oklch(75.2% 0.147 84), and in CSS you can also write the keyword goldenrod directly.
Is goldenrod a warm or cool color?
Goldenrod is a warm color: its hue is 43° 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 goldenrod?
Rotating the hue in OKLCH while keeping lightness and chroma, goldenrod's complementary color is #7EACFF (close to cornflowerblue), its analogous colors are #F5924B and #AEB839, and its triadic partners are #00C8D9 and #DC8CE3. For text on top, black gives the higher contrast.
Can you use white text on goldenrod?
White text on goldenrod has a contrast ratio of 2.23:1, which fails AA even for large text under WCAG 2.2. Black text reaches 9.38:1 and passes both AA and AAA. In APCA terms that is Lc −48.7 for white and Lc 60.1 for black.
What is the RGB value of goldenrod?
Goldenrod is rgb(218, 165, 32): red 218, green 165 and blue 32 on the 0 to 255 scale, or 85.5%, 64.7% and 12.5%. As a decimal integer it is 14329120.

Last reviewed by Arielton Oberek.