CSS named colour
Gold
#ffd700
A CSS named colour: gold is valid anywhere a colour is expected.
- RGB
- rgb(255 215 0)
- HSL
- 51°, 100%, 50%
- OKLCh
- 88.7% 0.182 95.3
Gold in every format
Web & CSSThe everyday formats for stylesheets and design tools.
| Hex | #ffd700 | |
|---|---|---|
| RGB | rgb(255 215 0) | |
| RGB legacy | rgb(255, 215, 0) | |
| RGB percent | rgb(100% 84.31% 0%) | |
| HSL | hsl(50.6 100% 50%) | |
| HSL legacy | hsl(50.6, 100%, 50%) | |
| HSV / HSB | hsv(50.6, 100%, 100%) | |
| HWB | hwb(50.6 0% 0%) | |
| Nearest name | gold | |
| CMYK | cmyk(0%, 15.7%, 100%, 0%)Naive conversion. Real print work needs an ICC profile. |
Perceptual & wide gamutModern CSS colour spaces for uniform scales and P3 displays.
| OKLCh | oklch(88.677% 0.18219 95.33)Modern CSS colour space for even palettes — better than HSL when building scales. | |
|---|---|---|
| OKLab | oklab(88.677% -0.01693 0.1814) | |
| CIE LCh | lch(87.468% 86.602 88.075) | |
| CIE Lab | lab(87.468% 2.91 86.553) | |
| Display P3 | color(display-p3 0.9746 0.849 0.2855) | |
| Rec. 2020 | color(rec2020 0.9231 0.8333 0.2458) | |
| srgb-linear | color(srgb-linear 1 0.6795 0)Light-linear sRGB — the same numbers a shader wants for maths. | |
| CIE XYZ (D65) | color(xyz-d65 0.6554 0.6986 0.1003) |
ShadersGLSL, HLSL and WGSL vectors in both encoded and linear form.
| GLSL vec3 — sRGB | vec3(1.0, 0.843, 0.0)Encoded values. Use when writing straight to the framebuffer. | |
|---|---|---|
| GLSL vec3 — linear | vec3(1.0, 0.68, 0.0)Light-linear values. Use for lighting, blending and mixing. | |
| GLSL vec4 — sRGB | vec4(1.0, 0.843, 0.0, 1.0) | |
| GLSL vec4 — linear | vec4(1.0, 0.68, 0.0, 1.0) | |
| GLSL ivec3 | ivec3(255, 215, 0) | |
| HLSL float3 — sRGB | float3(1.0, 0.843, 0.0) | |
| HLSL float3 — linear | float3(1.0, 0.68, 0.0) | |
| HLSL float4 — sRGB | float4(1.0, 0.843, 0.0, 1.0) | |
| HLSL half4 — sRGB | half4(1.0, 0.843, 0.0, 1.0) | |
| WGSL vec3f — sRGB | vec3f(1.0, 0.843, 0.0) | |
| WGSL vec4f — sRGB | vec4f(1.0, 0.843, 0.0, 1.0) | |
| WGSL vec3<f32> — linear | vec3<f32>(1.0, 0.68, 0.0) |
Engines & appsConstructors for Unity, Unreal, Godot, Flutter, SwiftUI and Android.
| Unity Color | new Color(1.0f, 0.843f, 0.0f, 1.0f)Color for everyday scripting (0–1). Color32 when you need whole numbers from 0 to 255. | |
|---|---|---|
| Unity Color32 | new Color32(255, 215, 0, 255) | |
| Unreal FLinearColor | FLinearColor(1.0f, 0.6795f, 0.0f, 1.0f)FLinearColor for materials and lighting. FColor when you need whole numbers from 0 to 255. | |
| Unreal FColor | FColor(255, 215, 0, 255)Whole numbers from 0 to 255 — use when an API asks for FColor, not FLinearColor. | |
| Godot Color | Color(1, 0.843, 0, 1) | |
| Flutter Color | Color(0xFFFFD700)Packed ARGB, so alpha comes first. | |
| Android Color | Color.rgb(255, 215, 0) | |
| SwiftUI Color | Color(red: 1, green: 0.843, blue: 0) | |
| UIKit UIColor | UIColor(red: 1, green: 0.843, blue: 0, alpha: 1) |
Raw valuesPacked integers and plain arrays.
| 0x hex | 0xFFD700 | |
|---|---|---|
| 0x hex (ARGB) | 0xFFFFD700 | |
| Array 0–1 | [1, 0.843, 0] | |
| Array 0–255 | [255, 215, 0] | |
| Decimal integer | 16766720 |
Contrast and accessibility
WCAG 2 ratios are what audits and legislation reference. APCA is shown alongside because WCAG 2 is known to misjudge mid-tone backgrounds, and it is the basis of the WCAG 3 draft.
| Pairing | WCAG 2 ratio | Level | APCA | Suitable for |
|---|---|---|---|---|
| Gold on white | 1.40:1 | Fail | Lc 19 | Not usable for text |
| Gold on black | 14.97:1 | AAA | Lc 84 | Body text, 18px and up |
Gold text on a white background
Gold text on a black background
White text on Gold
Black text on Gold
Tonal scale
Hue held fixed while lightness walks OKLCh, ready to use as a design system ramp.
- 50#fff8a3
- 100#ffed76
- 200#fbdb56
- 300#e7c31e
- 400#caa600
- 500#a88900
- 600#8a6f00
- 700#6f5900
- 800#594600
- 900#463600
- 950#291e00
Tints and shades
Mixed perceptually toward white and black, so the steps feel evenly spaced.
- Tint 1#ffdf5b
- Tint 2#ffe684
- Tint 3#ffeda6
- Tint 4#fff3c5
- Tint 5#fff9e2
- Shade 1#c8a800
- Shade 2#947c00
- Shade 3#635200
- Shade 4#362c00
- Shade 5#0f0a00
Colours that work with Gold
Complementary, triadic and analogous partners, rotated in OKLCh so they keep the same apparent brightness.
- #cbd6ff
- #68eeff
- #ffbbf9
- #ffcb8a
- #beee59
Closest CSS names
goldexact matchkhakiΔEok 0.077yellowΔEok 0.099palegoldenrodΔEok 0.109navajowhiteΔEok 0.119orangeΔEok 0.121