designwithfocus

Color codes & color models

Gold Color Code: HEX, RGB, CMYK and HSL for Gold

By Design With Focus Team 6 min read
Five gold swatches from pale yellow-gold to dark goldenrod with hex labels

Short answer

The CSS gold color code is #ffd700, which is rgb(255, 215, 0). The W3C's CSS Color Level 4 draft of 1 December 2026 lists that keyword, and the same hex appears on the CSS Working Group draft and on MDN. CMYK and HSL below are converted from those sRGB channels and rounded to whole numbers. Metallic print golds are not CSS keywords, so this page does not invent a hex for them.

Last verified against the sources listed below.

Key takeaways

  • CSS keyword gold is #ffd700, rgb(255, 215, 0). The keyword is ASCII case-insensitive.
  • goldenrod is #daa520, darkgoldenrod is #b8860b, palegoldenrod is #eee8aa, and lightgoldenrodyellow is #fafad2.
  • Those five names are in the W3C named-color table. Gold is not one of the 16 VGA names.
  • HSL and CMYK here are computed from the sRGB channels, then rounded to the nearest whole number.
  • The HTML living standard maps a named color to the CSS color for that keyword.
  • A jewelry or foil gold is a different color. Do not treat a made-up metallic hex as a CSS name.

The gold color code people can rely on in CSS is the named color gold. CSS Color Module Level 4, a W3C Candidate Recommendation Draft dated 1 December 2026, lists that keyword as #ffd700, with sRGB channels 255, 215, and 0.

The CSS Working Group draft dated the same day shows the same #ffd700 swatch. MDN’s named-color table lists #ffd700 for gold as well. Those are the screen values. They are not a metal sample.

What is the gold color code?

The gold color code is #ffd700, or rgb(255, 215, 0). In a stylesheet you can also write the keyword gold. Section 6.1 of the W3C draft says named colors exist so common colors can be written as an identifier anywhere a color is accepted.

The same section says the keywords are ASCII case-insensitive, as CSS identifiers usually are, so gold and GOLD are one keyword. The names resolve to colors in sRGB.

The draft also says 16 named colors come from the VGA palette: aqua, black, blue, fuchsia, gray, green, lime, maroon, navy, olive, purple, red, silver, teal, white, and yellow. Gold is not in that list of 16. The draft says most of the other names came from an X11 set later adopted into SVG.

The HTML living standard, last updated 2 December 2026, parses a named color by an ASCII case-insensitive match, then returns the CSS color for that keyword. A legacy HTML color attribute and a CSS declaration meet on the same word.

Copy the keyword or the hex from the Gold Color Code tool if you want the value without retyping it. The tool does not create a second definition. The specification does.

Which named CSS colors sit near gold?

Four other keywords in the same table are gold-family names. They are not mixes of #ffd700. Each row’s hex and RGB are copied from the W3C table. MDN lists the same hex codes.

Keyword HEX RGB
gold #ffd700 255, 215, 0
goldenrod #daa520 218, 165, 32
darkgoldenrod #b8860b 184, 134, 11
palegoldenrod #eee8aa 238, 232, 170
lightgoldenrodyellow #fafad2 250, 250, 210

goldenrod is darker and slightly green-leaning next to gold. darkgoldenrod is darker again. palegoldenrod and lightgoldenrodyellow are pale tints the specification already named. If you need a gold that is not one of these five words, it is a custom color, and you should label it as custom.

What colors make gold is a mixing question for paint. It does not change the CSS keyword.

RGB is the channel model these numbers use. The table is that model, copied from the specification, not a paint recipe.

How were the CMYK and HSL numbers computed?

CMYK and HSL are not columns in the named-color table. They are conversions from the sRGB channels above, rounded to the nearest whole number with halves rounding away from zero. The inputs are the channel divided by 255.

For HSL, let the largest channel fraction be Max and the smallest be Min. Lightness is (Max + Min) / 2. If Max equals Min, hue and saturation are 0. Otherwise saturation is (Max - Min) / (1 - the absolute value of (2 times lightness - 1)).

Hue is the position of that range around the wheel, in degrees. From red it uses green minus blue, from green it uses blue minus red plus 2, and from blue it uses red minus green plus 4, then that result is multiplied by 60 and wrapped into 0 to 360.

For CMYK, black is 1 minus the largest channel fraction. If black is 1, cyan, magenta, and yellow are 0. Otherwise each of those is (1 minus that channel minus black) / (1 minus black). Multiply by 100 and round.

Keyword HSL CMYK
gold 51, 100%, 50% 0, 16, 100, 0
goldenrod 43, 74%, 49% 0, 24, 85, 15
darkgoldenrod 43, 89%, 38% 0, 27, 94, 28
palegoldenrod 55, 67%, 80% 0, 3, 29, 7
lightgoldenrodyellow 60, 80%, 90% 0, 0, 16, 2

Gold’s unrounded hue is 50.588 degrees, so the nearest degree is 51. Its magenta fraction is about 0.157, so the nearest percent is 16. The other rows were rounded the same way. A one-degree difference is the rounding, not a second official hue.

How do you write gold in CSS?

Write the keyword, the hex, or the rgb() function. All three point at the channels in the table when the keyword is gold and the hex is #ffd700.

color: gold is the short form, and color: #ffd700 is the hex the draft prints. color: rgb(255 215 0) or rgb(255, 215, 0) carries the same three channels.

Use the keyword when you want the name to stay readable. Use the hex when a design tool asks for six digits.

Do not invent a suffix and expect a metal. gold is a flat sRGB color. It will not shimmer because the keyword sounds metallic. If the layout needs a highlight, that is a second shape or a gradient you design, not a different official gold.

What should you leave out of a gold spec?

Leave out any hex that the named-color table does not list, if you are claiming it is “the” gold. Jewelry catalogs, foil brands, and social-media palettes publish their own codes. Those codes can be useful as custom colors. They are not the CSS keyword.

Also leave out a contrast ratio unless you compute it for a specific pair and show the inputs. This page does not. #ffd700 on white is a different problem from #ffd700 on black, and a ratio you did not calculate does not belong in the table.

For print, hand the rounded CMYK over as a start, then proof it. The conversion ignores the press profile on purpose so the arithmetic stays repeatable. A Pantone match, if the job needs one, comes from the library and the printer, not from renaming #ffd700.

Frequently asked questions

What is the HEX code for gold?

The CSS keyword gold is #ffd700. CSS Color Module Level 4, the Candidate Recommendation Draft of 1 December 2026, lists that hex next to the sRGB channels 255, 215, and 0. MDN's named-color table shows the same #ffd700. You can type the keyword gold in a stylesheet. The specification says these keywords are ASCII case-insensitive, so Gold and GOLD are the same keyword. The hex digits above are the form the specification prints.

What is the RGB code for gold?

rgb(255, 215, 0). That is the channel triple in the W3C named-color table for gold: red 255, green 215, blue 0. The specification says the names resolve to colors in sRGB. Divide each channel by 255 if you need the 0 to 1 fractions used in the HSL and CMYK conversion: 1, about 0.843, and 0. Those fractions are the inputs. They are not a second official notation.

What RGB values do the nearby gold names use?

goldenrod is 218, 165, 32. darkgoldenrod is 184, 134, 11. palegoldenrod is 238, 232, 170. lightgoldenrodyellow is 250, 250, 210. All four are named colors in the same W3C table, and MDN lists the matching hex codes #daa520, #b8860b, #eee8aa, and #fafad2. They are not tints you mix from gold. Each one is its own keyword with its own channels.

Why is there no single metallic gold hex?

CSS names a flat sRGB color, not a metal. Foil, jewelry, and ink mixtures change with the light and the paper, and the specification does not assign them the keyword gold. Inventing a hex such as a jewelry average would pretend the spec listed it. If you need a print mix, start from a measured sample or a color library your printer uses. The keyword gold remains #ffd700 on screen.

Are the CMYK numbers press-ready?

They are a profile-free conversion from the sRGB channels, rounded to the nearest whole percent. Black is 1 minus the largest channel. The other inks are what remains after black is removed, divided by 1 minus black. A real press profile can shift the printed result. Treat the table as a starting point you can hand to a designer, then proof on the stock. Screen gold and printed gold are not guaranteed to match.

Sources