CSS named colour

Yellow

#ffff00

A CSS named colour: yellow is valid anywhere a colour is expected.

RGB
rgb(255 255 0)
HSL
60°, 100%, 50%
OKLCh
96.8% 0.211 109.8

Open in the picker

Yellow in every format

Web & CSSThe everyday formats for stylesheets and design tools.

Hex#ffff00
RGBrgb(255 255 0)
RGB legacyrgb(255, 255, 0)
RGB percentrgb(100% 100% 0%)
HSLhsl(60 100% 50%)
HSL legacyhsl(60, 100%, 50%)
HSV / HSBhsv(60, 100%, 100%)
HWBhwb(60 0% 0%)
Nearest nameyellow
CMYKcmyk(0%, 0%, 100%, 0%)Naive conversion. Real print work needs an ICC profile.

Perceptual & wide gamutModern CSS colour spaces for uniform scales and P3 displays.

OKLChoklch(96.798% 0.21101 109.769)Modern CSS colour space for even palettes — better than HSL when building scales.
OKLaboklab(96.798% -0.07137 0.19857)
CIE LChlch(97.607% 94.712 99.572)
CIE Lablab(97.607% -15.75 93.394)
Display P3color(display-p3 1 1 0.3309)
Rec. 2020color(rec2020 0.9783 0.9944 0.2984)
srgb-linearcolor(srgb-linear 1 1 0)Light-linear sRGB — the same numbers a shader wants for maths.
CIE XYZ (D65)color(xyz-d65 0.77 0.9278 0.1385)

ShadersGLSL, HLSL and WGSL vectors in both encoded and linear form.

GLSL vec3 — sRGBvec3(1.0, 1.0, 0.0)Encoded values. Use when writing straight to the framebuffer.
GLSL vec3 — linearvec3(1.0, 1.0, 0.0)Light-linear values. Use for lighting, blending and mixing.
GLSL vec4 — sRGBvec4(1.0, 1.0, 0.0, 1.0)
GLSL vec4 — linearvec4(1.0, 1.0, 0.0, 1.0)
GLSL ivec3ivec3(255, 255, 0)
HLSL float3 — sRGBfloat3(1.0, 1.0, 0.0)
HLSL float3 — linearfloat3(1.0, 1.0, 0.0)
HLSL float4 — sRGBfloat4(1.0, 1.0, 0.0, 1.0)
HLSL half4 — sRGBhalf4(1.0, 1.0, 0.0, 1.0)
WGSL vec3f — sRGBvec3f(1.0, 1.0, 0.0)
WGSL vec4f — sRGBvec4f(1.0, 1.0, 0.0, 1.0)
WGSL vec3<f32> — linearvec3<f32>(1.0, 1.0, 0.0)

Engines & appsConstructors for Unity, Unreal, Godot, Flutter, SwiftUI and Android.

Unity Colornew Color(1.0f, 1.0f, 0.0f, 1.0f)Color for everyday scripting (0–1). Color32 when you need whole numbers from 0 to 255.
Unity Color32new Color32(255, 255, 0, 255)
Unreal FLinearColorFLinearColor(1.0f, 1.0f, 0.0f, 1.0f)FLinearColor for materials and lighting. FColor when you need whole numbers from 0 to 255.
Unreal FColorFColor(255, 255, 0, 255)Whole numbers from 0 to 255 — use when an API asks for FColor, not FLinearColor.
Godot ColorColor(1, 1, 0, 1)
Flutter ColorColor(0xFFFFFF00)Packed ARGB, so alpha comes first.
Android ColorColor.rgb(255, 255, 0)
SwiftUI ColorColor(red: 1, green: 1, blue: 0)
UIKit UIColorUIColor(red: 1, green: 1, blue: 0, alpha: 1)

Raw valuesPacked integers and plain arrays.

0x hex0xFFFF00
0x hex (ARGB)0xFFFFFF00
Array 0–1[1, 1, 0]
Array 0–255[255, 255, 0]
Decimal integer16776960

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.

PairingWCAG 2 ratioLevelAPCASuitable for
Yellow on white1.07:1FailLc 0Not usable for text
Yellow on black19.56:1AAALc 103Body text at any size

Yellow text on a white background

Yellow text on a black background

White text on Yellow

Black text on Yellow

Tonal scale

Hue held fixed while lightness walks OKLCh, ready to use as a design system ramp.

  • 50#feff79
  • 100#f5f766
  • 200#e5e540
  • 300#cfce00
  • 400#b2b100
  • 500#939200
  • 600#787700
  • 700#605f00
  • 800#4c4b00
  • 900#3c3b00
  • 950#222100

Tints and shades

Mixed perceptually toward white and black, so the steps feel evenly spaced.

  • Tint 1#feff61
  • Tint 2#feff8b
  • Tint 3#feffac
  • Tint 4#feffca
  • Tint 5#feffe5
  • Shade 1#c8c800
  • Shade 2#949400
  • Shade 3#636300
  • Shade 4#363600
  • Shade 5#0f0f00

Colours that work with Yellow

Complementary, triadic and analogous partners, rotated in OKLCh so they keep the same apparent brightness.

  • #f3f1ff
  • #d7fbff
  • #ffe9f9
  • #fff0c1
  • #d0ffc3

Closest CSS names

  • yellowexact match
  • greenyellowΔEok 0.098
  • goldΔEok 0.099
  • khakiΔEok 0.115
  • palegreenΔEok 0.136
  • palegoldenrodΔEok 0.140