CSS named colour

Blue Violet

#8a2be2

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

RGB
rgb(138 43 226)
HSL
271°, 76%, 53%
OKLCh
53.4% 0.250 301.4

Open in the picker

Blue Violet in every format

Web & CSSThe everyday formats for stylesheets and design tools.

Hex#8a2be2
RGBrgb(138 43 226)
RGB legacyrgb(138, 43, 226)
RGB percentrgb(54.12% 16.86% 88.63%)
HSLhsl(271.1 75.9% 52.7%)
HSL legacyhsl(271.1, 75.9%, 52.7%)
HSV / HSBhsv(271.1, 81%, 88.6%)
HWBhwb(271.1 16.9% 11.4%)
Nearest nameblueviolet
CMYKcmyk(38.9%, 81%, 0%, 11.4%)Naive conversion. Real print work needs an ICC profile.

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

OKLChoklch(53.376% 0.25031 301.375)Modern CSS colour space for even palettes — better than HSL when building scales.
OKLaboklab(53.376% 0.13032 -0.21371)
CIE LChlch(41.211% 98.691 309.675)
CIE Lablab(41.211% 63.008 -75.96)
Display P3color(display-p3 0.4992 0.1957 0.8535)
Rec. 2020color(rec2020 0.4339 0.1821 0.8294)
srgb-linearcolor(srgb-linear 0.2542 0.0242 0.7605)Light-linear sRGB — the same numbers a shader wants for maths.
CIE XYZ (D65)color(xyz-d65 0.2507 0.1262 0.7307)

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

GLSL vec3 — sRGBvec3(0.541, 0.169, 0.886)Encoded values. Use when writing straight to the framebuffer.
GLSL vec3 — linearvec3(0.254, 0.024, 0.761)Light-linear values. Use for lighting, blending and mixing.
GLSL vec4 — sRGBvec4(0.541, 0.169, 0.886, 1.0)
GLSL vec4 — linearvec4(0.254, 0.024, 0.761, 1.0)
GLSL ivec3ivec3(138, 43, 226)
HLSL float3 — sRGBfloat3(0.541, 0.169, 0.886)
HLSL float3 — linearfloat3(0.254, 0.024, 0.761)
HLSL float4 — sRGBfloat4(0.541, 0.169, 0.886, 1.0)
HLSL half4 — sRGBhalf4(0.541, 0.169, 0.886, 1.0)
WGSL vec3f — sRGBvec3f(0.541, 0.169, 0.886)
WGSL vec4f — sRGBvec4f(0.541, 0.169, 0.886, 1.0)
WGSL vec3<f32> — linearvec3<f32>(0.254, 0.024, 0.761)

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

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

Raw valuesPacked integers and plain arrays.

0x hex0x8A2BE2
0x hex (ARGB)0xFF8A2BE2
Array 0–1[0.541, 0.169, 0.886]
Array 0–255[138, 43, 226]
Decimal integer9055202

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
Blue Violet on white5.96:1AALc 78Body text, 18px and up
Blue Violet on black3.52:1AA LargeLc 23Not usable for text

Blue Violet text on a white background

Blue Violet text on a black background

White text on Blue Violet

Black text on Blue Violet

Tonal scale

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

  • 50#fcf2ff
  • 100#f4e6ff
  • 200#e6d0ff
  • 300#d5b1ff
  • 400#c087ff
  • 500#a954ff
  • 600#8e36e4
  • 700#751bc3
  • 800#5f00a5
  • 900#4d008a
  • 950#2e0058

Tints and shades

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

  • Tint 1#9c5aea
  • Tint 2#ae7ff0
  • Tint 3#c1a0f6
  • Tint 4#d5c0fa
  • Tint 5#eadffd
  • Shade 1#6b1fb1
  • Shade 2#4e1483
  • Shade 3#320a57
  • Shade 4#18032f
  • Shade 5#04000c

Colours that work with Blue Violet

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

  • #607900
  • #a65400
  • #008271
  • #424efa
  • #b600ac

Closest CSS names

  • bluevioletexact match
  • darkvioletΔEok 0.043
  • darkorchidΔEok 0.049
  • slateblueΔEok 0.098
  • mediumslateblueΔEok 0.109
  • mediumorchidΔEok 0.125