CSS named colour
Dark Violet
#9400d3
A CSS named colour: darkviolet is valid anywhere a colour is expected.
- RGB
- rgb(148 0 211)
- HSL
- 282°, 100%, 41%
- OKLCh
- 51.5% 0.261 309.8
Dark Violet in every format
Web & CSSThe everyday formats for stylesheets and design tools.
| Hex | #9400d3 | |
|---|---|---|
| RGB | rgb(148 0 211) | |
| RGB legacy | rgb(148, 0, 211) | |
| RGB percent | rgb(58.04% 0% 82.75%) | |
| HSL | hsl(282.1 100% 41.4%) | |
| HSL legacy | hsl(282.1, 100%, 41.4%) | |
| HSV / HSB | hsv(282.1, 100%, 82.7%) | |
| HWB | hwb(282.1 0% 17.3%) | |
| Nearest name | darkviolet | |
| CMYK | cmyk(29.9%, 100%, 0%, 17.3%)Naive conversion. Real print work needs an ICC profile. |
Perceptual & wide gamutModern CSS colour spaces for uniform scales and P3 displays.
| OKLCh | oklch(51.491% 0.26067 309.811)Modern CSS colour space for even palettes — better than HSL when building scales. | |
|---|---|---|
| OKLab | oklab(51.491% 0.1669 -0.20024) | |
| CIE LCh | lch(38.791% 100.18 314.673) | |
| CIE Lab | lab(38.791% 70.433 -71.241) | |
| Display P3 | color(display-p3 0.5307 0.0988 0.7967) | |
| Rec. 2020 | color(rec2020 0.45 0.1202 0.7665) | |
| srgb-linear | color(srgb-linear 0.2961 0 0.6514)Light-linear sRGB — the same numbers a shader wants for maths. | |
| CIE XYZ (D65) | color(xyz-d65 0.2397 0.11 0.6249) |
ShadersGLSL, HLSL and WGSL vectors in both encoded and linear form.
| GLSL vec3 — sRGB | vec3(0.58, 0.0, 0.827)Encoded values. Use when writing straight to the framebuffer. | |
|---|---|---|
| GLSL vec3 — linear | vec3(0.296, 0.0, 0.651)Light-linear values. Use for lighting, blending and mixing. | |
| GLSL vec4 — sRGB | vec4(0.58, 0.0, 0.827, 1.0) | |
| GLSL vec4 — linear | vec4(0.296, 0.0, 0.651, 1.0) | |
| GLSL ivec3 | ivec3(148, 0, 211) | |
| HLSL float3 — sRGB | float3(0.58, 0.0, 0.827) | |
| HLSL float3 — linear | float3(0.296, 0.0, 0.651) | |
| HLSL float4 — sRGB | float4(0.58, 0.0, 0.827, 1.0) | |
| HLSL half4 — sRGB | half4(0.58, 0.0, 0.827, 1.0) | |
| WGSL vec3f — sRGB | vec3f(0.58, 0.0, 0.827) | |
| WGSL vec4f — sRGB | vec4f(0.58, 0.0, 0.827, 1.0) | |
| WGSL vec3<f32> — linear | vec3<f32>(0.296, 0.0, 0.651) |
Engines & appsConstructors for Unity, Unreal, Godot, Flutter, SwiftUI and Android.
| Unity Color | new Color(0.58f, 0.0f, 0.827f, 1.0f)Color for everyday scripting (0–1). Color32 when you need whole numbers from 0 to 255. | |
|---|---|---|
| Unity Color32 | new Color32(148, 0, 211, 255) | |
| Unreal FLinearColor | FLinearColor(0.2961f, 0.0f, 0.6514f, 1.0f)FLinearColor for materials and lighting. FColor when you need whole numbers from 0 to 255. | |
| Unreal FColor | FColor(148, 0, 211, 255)Whole numbers from 0 to 255 — use when an API asks for FColor, not FLinearColor. | |
| Godot Color | Color(0.58, 0, 0.827, 1) | |
| Flutter Color | Color(0xFF9400D3)Packed ARGB, so alpha comes first. | |
| Android Color | Color.rgb(148, 0, 211) | |
| SwiftUI Color | Color(red: 0.58, green: 0, blue: 0.827) | |
| UIKit UIColor | UIColor(red: 0.58, green: 0, blue: 0.827, alpha: 1) |
Raw valuesPacked integers and plain arrays.
| 0x hex | 0x9400D3 | |
|---|---|---|
| 0x hex (ARGB) | 0xFF9400D3 | |
| Array 0–1 | [0.58, 0, 0.827] | |
| Array 0–255 | [148, 0, 211] | |
| Decimal integer | 9699539 |
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 |
|---|---|---|---|---|
| Dark Violet on white | 6.56:1 | AA | Lc 80 | Body text, 18px and up |
| Dark Violet on black | 3.20:1 | AA Large | Lc 22 | Not usable for text |
Dark Violet text on a white background
Dark Violet text on a black background
White text on Dark Violet
Black text on Dark Violet
Tonal scale
Hue held fixed while lightness walks OKLCh, ready to use as a design system ramp.
- 50#fff0ff
- 100#fae3ff
- 200#f0cbff
- 300#e3aaff
- 400#d27aff
- 500#ba46fe
- 600#9e26dc
- 700#8300bb
- 800#6b009e
- 900#560080
- 950#330050
Tints and shades
Mixed perceptually toward white and black, so the steps feel evenly spaced.
- Tint 1#a64cdd
- Tint 2#b874e6
- Tint 3#c998ee
- Tint 4#dbbbf5
- Tint 5#edddfb
- Shade 1#7300a5
- Shade 2#54007a
- Shade 3#360051
- Shade 4#1b002b
- Shade 5#05000a
Colours that work with Dark Violet
Complementary, triadic and analogous partners, rotated in OKLCh so they keep the same apparent brightness.
- #477800
- #965600
- #007a75
- #5838f6
- #b70092
Closest CSS names
darkvioletexact matchdarkorchidΔEok 0.043bluevioletΔEok 0.043darkmagentaΔEok 0.115rebeccapurpleΔEok 0.127slateblueΔEok 0.129