CSS named colour
Purple
#800080
A CSS named colour: purple is valid anywhere a colour is expected.
- RGB
- rgb(128 0 128)
- HSL
- 300°, 100%, 25%
- OKLCh
- 42.1% 0.193 328.4
Purple in every format
Web & CSSThe everyday formats for stylesheets and design tools.
| Hex | #800080 | |
|---|---|---|
| RGB | rgb(128 0 128) | |
| RGB legacy | rgb(128, 0, 128) | |
| RGB percent | rgb(50.2% 0% 50.2%) | |
| HSL | hsl(300 100% 25.1%) | |
| HSL legacy | hsl(300, 100%, 25.1%) | |
| HSV / HSB | hsv(300, 100%, 50.2%) | |
| HWB | hwb(300 0% 49.8%) | |
| Nearest name | purple | |
| CMYK | cmyk(0%, 100%, 0%, 49.8%)Naive conversion. Real print work needs an ICC profile. |
Perceptual & wide gamutModern CSS colour spaces for uniform scales and P3 displays.
| OKLCh | oklch(42.091% 0.19345 328.363)Modern CSS colour space for even palettes — better than HSL when building scales. | |
|---|---|---|
| OKLab | oklab(42.091% 0.1647 -0.10147) | |
| CIE LCh | lch(29.692% 66.826 327.105) | |
| CIE Lab | lab(29.692% 56.112 -36.293) | |
| Display P3 | color(display-p3 0.4584 0.0798 0.4848) | |
| Rec. 2020 | color(rec2020 0.3614 0.0782 0.4297) | |
| srgb-linear | color(srgb-linear 0.2159 0 0.2159)Light-linear sRGB — the same numbers a shader wants for maths. | |
| CIE XYZ (D65) | color(xyz-d65 0.128 0.0615 0.2094) |
ShadersGLSL, HLSL and WGSL vectors in both encoded and linear form.
| GLSL vec3 — sRGB | vec3(0.502, 0.0, 0.502)Encoded values. Use when writing straight to the framebuffer. | |
|---|---|---|
| GLSL vec3 — linear | vec3(0.216, 0.0, 0.216)Light-linear values. Use for lighting, blending and mixing. | |
| GLSL vec4 — sRGB | vec4(0.502, 0.0, 0.502, 1.0) | |
| GLSL vec4 — linear | vec4(0.216, 0.0, 0.216, 1.0) | |
| GLSL ivec3 | ivec3(128, 0, 128) | |
| HLSL float3 — sRGB | float3(0.502, 0.0, 0.502) | |
| HLSL float3 — linear | float3(0.216, 0.0, 0.216) | |
| HLSL float4 — sRGB | float4(0.502, 0.0, 0.502, 1.0) | |
| HLSL half4 — sRGB | half4(0.502, 0.0, 0.502, 1.0) | |
| WGSL vec3f — sRGB | vec3f(0.502, 0.0, 0.502) | |
| WGSL vec4f — sRGB | vec4f(0.502, 0.0, 0.502, 1.0) | |
| WGSL vec3<f32> — linear | vec3<f32>(0.216, 0.0, 0.216) |
Engines & appsConstructors for Unity, Unreal, Godot, Flutter, SwiftUI and Android.
| Unity Color | new Color(0.502f, 0.0f, 0.502f, 1.0f)Color for everyday scripting (0–1). Color32 when you need whole numbers from 0 to 255. | |
|---|---|---|
| Unity Color32 | new Color32(128, 0, 128, 255) | |
| Unreal FLinearColor | FLinearColor(0.2159f, 0.0f, 0.2159f, 1.0f)FLinearColor for materials and lighting. FColor when you need whole numbers from 0 to 255. | |
| Unreal FColor | FColor(128, 0, 128, 255)Whole numbers from 0 to 255 — use when an API asks for FColor, not FLinearColor. | |
| Godot Color | Color(0.502, 0, 0.502, 1) | |
| Flutter Color | Color(0xFF800080)Packed ARGB, so alpha comes first. | |
| Android Color | Color.rgb(128, 0, 128) | |
| SwiftUI Color | Color(red: 0.502, green: 0, blue: 0.502) | |
| UIKit UIColor | UIColor(red: 0.502, green: 0, blue: 0.502, alpha: 1) |
Raw valuesPacked integers and plain arrays.
| 0x hex | 0x800080 | |
|---|---|---|
| 0x hex (ARGB) | 0xFF800080 | |
| Array 0–1 | [0.502, 0, 0.502] | |
| Array 0–255 | [128, 0, 128] | |
| Decimal integer | 8388736 |
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 |
|---|---|---|---|---|
| Purple on white | 9.42:1 | AAA | Lc 90 | Body text, 18px and up |
| Purple on black | 2.23:1 | Fail | Lc 13 | Not usable for text |
Purple text on a white background
Purple text on a black background
White text on Purple
Black text on Purple
Tonal scale
Hue held fixed while lightness walks OKLCh, ready to use as a design system ramp.
- 50#ffedff
- 100#ffdcff
- 200#ffbeff
- 300#ff9afe
- 400#e679e3
- 500#c757c5
- 600#a93da7
- 700#8c278b
- 800#731473
- 900#5e035e
- 950#3c003d
Tints and shades
Mixed perceptually toward white and black, so the steps feel evenly spaced.
- Tint 1#973e96
- Tint 2#ae66ab
- Tint 3#c38cc0
- Tint 4#d8b2d5
- Tint 5#ecd8ea
- Shade 1#630063
- Shade 2#480048
- Shade 3#2e002e
- Shade 4#160016
- Shade 5#030003
Colours that work with Purple
Complementary, triadic and analogous partners, rotated in OKLCh so they keep the same apparent brightness.
- #00620f
- #654800
- #005a68
- #5e21a6
- #94004c
Closest CSS names
purpleexact matchdarkmagentaΔEok 0.028rebeccapurpleΔEok 0.085indigoΔEok 0.120darkslateblueΔEok 0.132darkvioletΔEok 0.136