CSS named colour
Violet
#ee82ee
A CSS named colour: violet is valid anywhere a colour is expected.
- RGB
- rgb(238 130 238)
- HSL
- 300°, 76%, 72%
- OKLCh
- 76.2% 0.186 327.2
Violet in every format
Web & CSSThe everyday formats for stylesheets and design tools.
| Hex | #ee82ee | |
|---|---|---|
| RGB | rgb(238 130 238) | |
| RGB legacy | rgb(238, 130, 238) | |
| RGB percent | rgb(93.33% 50.98% 93.33%) | |
| HSL | hsl(300 76.1% 72.2%) | |
| HSL legacy | hsl(300, 76.1%, 72.2%) | |
| HSV / HSB | hsv(300, 45.4%, 93.3%) | |
| HWB | hwb(300 51% 6.7%) | |
| Nearest name | violet | |
| CMYK | cmyk(0%, 45.4%, 0%, 6.7%)Naive conversion. Real print work needs an ICC profile. |
Perceptual & wide gamutModern CSS colour spaces for uniform scales and P3 displays.
| OKLCh | oklch(76.19% 0.18612 327.21)Modern CSS colour space for even palettes — better than HSL when building scales. | |
|---|---|---|
| OKLab | oklab(76.19% 0.15647 -0.1008) | |
| CIE LCh | lch(69.618% 64.617 325.566) | |
| CIE Lab | lab(69.618% 53.295 -36.538) | |
| Display P3 | color(display-p3 0.8771 0.5313 0.9109) | |
| Rec. 2020 | color(rec2020 0.8044 0.5147 0.8946) | |
| srgb-linear | color(srgb-linear 0.855 0.2232 0.855)Light-linear sRGB — the same numbers a shader wants for maths. | |
| CIE XYZ (D65) | color(xyz-d65 0.5867 0.4032 0.8558) |
ShadersGLSL, HLSL and WGSL vectors in both encoded and linear form.
| GLSL vec3 — sRGB | vec3(0.933, 0.51, 0.933)Encoded values. Use when writing straight to the framebuffer. | |
|---|---|---|
| GLSL vec3 — linear | vec3(0.855, 0.223, 0.855)Light-linear values. Use for lighting, blending and mixing. | |
| GLSL vec4 — sRGB | vec4(0.933, 0.51, 0.933, 1.0) | |
| GLSL vec4 — linear | vec4(0.855, 0.223, 0.855, 1.0) | |
| GLSL ivec3 | ivec3(238, 130, 238) | |
| HLSL float3 — sRGB | float3(0.933, 0.51, 0.933) | |
| HLSL float3 — linear | float3(0.855, 0.223, 0.855) | |
| HLSL float4 — sRGB | float4(0.933, 0.51, 0.933, 1.0) | |
| HLSL half4 — sRGB | half4(0.933, 0.51, 0.933, 1.0) | |
| WGSL vec3f — sRGB | vec3f(0.933, 0.51, 0.933) | |
| WGSL vec4f — sRGB | vec4f(0.933, 0.51, 0.933, 1.0) | |
| WGSL vec3<f32> — linear | vec3<f32>(0.855, 0.223, 0.855) |
Engines & appsConstructors for Unity, Unreal, Godot, Flutter, SwiftUI and Android.
| Unity Color | new Color(0.933f, 0.51f, 0.933f, 1.0f)Color for everyday scripting (0–1). Color32 when you need whole numbers from 0 to 255. | |
|---|---|---|
| Unity Color32 | new Color32(238, 130, 238, 255) | |
| Unreal FLinearColor | FLinearColor(0.855f, 0.2232f, 0.855f, 1.0f)FLinearColor for materials and lighting. FColor when you need whole numbers from 0 to 255. | |
| Unreal FColor | FColor(238, 130, 238, 255)Whole numbers from 0 to 255 — use when an API asks for FColor, not FLinearColor. | |
| Godot Color | Color(0.933, 0.51, 0.933, 1) | |
| Flutter Color | Color(0xFFEE82EE)Packed ARGB, so alpha comes first. | |
| Android Color | Color.rgb(238, 130, 238) | |
| SwiftUI Color | Color(red: 0.933, green: 0.51, blue: 0.933) | |
| UIKit UIColor | UIColor(red: 0.933, green: 0.51, blue: 0.933, alpha: 1) |
Raw valuesPacked integers and plain arrays.
| 0x hex | 0xEE82EE | |
|---|---|---|
| 0x hex (ARGB) | 0xFFEE82EE | |
| Array 0–1 | [0.933, 0.51, 0.933] | |
| Array 0–255 | [238, 130, 238] | |
| Decimal integer | 15631086 |
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 |
|---|---|---|---|---|
| Violet on white | 2.32:1 | Fail | Lc 45 | Large headings only |
| Violet on black | 9.06:1 | AAA | Lc 57 | Large headings only |
Violet text on a white background
Violet text on a black background
White text on Violet
Black text on Violet
Tonal scale
Hue held fixed while lightness walks OKLCh, ready to use as a design system ramp.
- 50#ffedff
- 100#ffddff
- 200#ffbfff
- 300#fe9cfe
- 400#e37ce3
- 500#c45ac4
- 600#a641a7
- 700#892b8b
- 800#711973
- 900#5c095e
- 950#3b003c
Tints and shades
Mixed perceptually toward white and black, so the steps feel evenly spaced.
- Tint 1#f298f2
- Tint 2#f6aef5
- Tint 3#f9c3f8
- Tint 4#fcd7fb
- Tint 5#feebfd
- Shade 1#bb65bb
- Shade 2#8a498a
- Shade 3#5c2f5c
- Shade 4#321632
- Shade 5#0d030d
Colours that work with Violet
Complementary, triadic and analogous partners, rotated in OKLCh so they keep the same apparent brightness.
- #4cd067
- #e1a800
- #00cbe2
- #be98ff
- #ff78b3
Closest CSS names
violetexact matchorchidΔEok 0.060plumΔEok 0.081hotpinkΔEok 0.089palevioletredΔEok 0.134mediumorchidΔEok 0.140