Gold hex code

The hex code for gold is #FFD700, or rgb(255, 215, 0). CSS also accepts the keyword gold.

#FFD700
HEX#FFD700
RGBrgb(255, 215, 0)
HSLhsl(51, 100%, 50%)
HSV / HSBhsv(51, 100%, 100%)
OKLCHoklch(88.68% 0.1822 95.33)
CMYKcmyk(0%, 16%, 100%, 0%)
HEX, 50% opacity#FFD70080
RGB, 50% opacityrgb(255 215 0 / 50%)
CSS namegold
Defined inCSS Color 3 (from the X11 color names)

About gold

In CSS, gold (#FFD700) is a bright, warm yellow. It is gold as a flat color: a screen color cannot shine like metal, so a metallic look needs a gradient or texture of several yellows and browns.

Deeper golds among the CSS named colors are goldenrod (#DAA520) and darkgoldenrod (#B8860B), and khaki (#F0E68C) and palegoldenrod (#EEE8AA) are softer, paler versions.

Shades and tints of gold

Gold lands on the 200 step. The steps follow a lightness curve modeled on Tailwind CSS's default palette; build your own in the Tailwind color generator. For gold mixed with white, black or gray in even steps, use the tint and shade generator.

50#FDF8E4100#FAEFC4200#FFD700300#EFC500400#CFAA00500#B89700600#987B00700#7D6500800#685300900#574500950#342700

Colors that go with gold

Partner hues are picked on the OKLCH color wheel at a mid lightness, because gold itself is very light.

Complementary: the opposite hue

#FFD700#BBC9FF

Open in the palette generator · Compare the screen and painter's complements of gold

Analogous: neighboring hues 30° either side

#FFD700#FFBA64#B2E24B

Open in the palette generator · See analogous and monochromatic colors of gold on three wheels

Triadic: three hues 120° apart

#FFD700#00E6FF#FFA5F5

Open in the palette generator

Split complementary: the two hues beside the complement

#FFD700#94D5FF#E0B9FF

Open in the palette generator

Text on gold

Black text on gold: 14.97:1
TextRatioAA normalAA largeAAA normal
White1.4:1FailFailFail
Black14.97:1PassPassPass

Check other pairs in the color contrast checker.

Similar named colors

The CSS named colors closest to gold, by deltaE OK distance.

khaki #F0E68Cyellow #FFFF00palegoldenrod #EEE8AAnavajowhite #FFDEADorange #FFA500wheat #F5DEB3

See all 148 on the color names page.

Closest Tailwind CSS colors

amber-300 v4: amber-300, #FFD230, deltaE OK 0.019

yellow-300 v3: yellow-300, #FDE047, deltaE OK 0.026

In Tailwind CSS v4 it is amber-300 (#FFD230), and in v3 yellow-300 (#FDE047). For the exact color, use an arbitrary value such as bg-[#ffd700]. A deltaE OK of around 0.02 is roughly the smallest difference most people notice side by side. Browse every shade on the Tailwind CSS colors page.

Gold with color vision deficiency

An approximation of how gold may look with protanopia, deuteranopia and tritanopia (simulated with Machado, Oliveira and Fernandes, 2009), and with achromatopsia, shown as a gray of the same luminance.

protanopia #F0D300deuteranopia #FADF24tritanopia #FFC4B7achromatopsia #DADADA

Test a whole palette or image in the color blindness simulator.

Using gold in code

.example {
  color: gold;                 /* named color */
  background-color: #ffd700;  /* hex */
  border-color: rgb(255, 215, 0);
}

Frequently asked questions

What is the hex code for gold?
#FFD700. CSS also accepts the keyword gold, which means the same color.
What is gold in RGB?
rgb(255, 215, 0). In HSL it is hsl(51, 100%, 50%), and in OKLCH oklch(88.68% 0.1822 95.33).
What text color goes on gold?
Black text has the higher contrast on #FFD700: 14.97:1, which meets AAA for all text. White text reaches 1.4:1.
What is the closest Tailwind color to gold?
In Tailwind CSS v4 it is amber-300 (#FFD230), and in v3 yellow-300 (#FDE047). For the exact color, use an arbitrary value such as bg-[#ffd700].
How do I make gold transparent?
Add an alpha value. Half-transparent gold is #FFD70080 as 8-digit HEX (80 is 128 out of 255) or rgb(255 215 0 / 50%).