CSS named colour

Medium Purple

#9370db

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

RGB
rgb(147 112 219)
HSL
260°, 60%, 65%
OKLCh
62.7% 0.158 296.7

Open in the picker

Medium Purple in every format

Web & CSSThe everyday formats for stylesheets and design tools.

Hex#9370db
RGBrgb(147 112 219)
RGB legacyrgb(147, 112, 219)
RGB percentrgb(57.65% 43.92% 85.88%)
HSLhsl(259.6 59.8% 64.9%)
HSL legacyhsl(259.6, 59.8%, 64.9%)
HSV / HSBhsv(259.6, 48.9%, 85.9%)
HWBhwb(259.6 43.9% 14.1%)
Nearest namemediumpurple
CMYKcmyk(32.9%, 48.9%, 0%, 14.1%)Naive conversion. Real print work needs an ICC profile.

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

OKLChoklch(62.691% 0.15803 296.672)Modern CSS colour space for even palettes — better than HSL when building scales.
OKLaboklab(62.691% 0.07094 -0.14121)
CIE LChlch(54.45% 59.733 302.059)
CIE Lablab(54.45% 31.706 -50.624)
Display P3color(display-p3 0.5552 0.4446 0.8332)
Rec. 2020color(rec2020 0.5076 0.4053 0.8084)
srgb-linearcolor(srgb-linear 0.2918 0.162 0.7084)Light-linear sRGB — the same numbers a shader wants for maths.
CIE XYZ (D65)color(xyz-d65 0.3061 0.2291 0.6983)

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

GLSL vec3 — sRGBvec3(0.576, 0.439, 0.859)Encoded values. Use when writing straight to the framebuffer.
GLSL vec3 — linearvec3(0.292, 0.162, 0.708)Light-linear values. Use for lighting, blending and mixing.
GLSL vec4 — sRGBvec4(0.576, 0.439, 0.859, 1.0)
GLSL vec4 — linearvec4(0.292, 0.162, 0.708, 1.0)
GLSL ivec3ivec3(147, 112, 219)
HLSL float3 — sRGBfloat3(0.576, 0.439, 0.859)
HLSL float3 — linearfloat3(0.292, 0.162, 0.708)
HLSL float4 — sRGBfloat4(0.576, 0.439, 0.859, 1.0)
HLSL half4 — sRGBhalf4(0.576, 0.439, 0.859, 1.0)
WGSL vec3f — sRGBvec3f(0.576, 0.439, 0.859)
WGSL vec4f — sRGBvec4f(0.576, 0.439, 0.859, 1.0)
WGSL vec3<f32> — linearvec3<f32>(0.292, 0.162, 0.708)

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

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

Raw valuesPacked integers and plain arrays.

0x hex0x9370DB
0x hex (ARGB)0xFF9370DB
Array 0–1[0.576, 0.439, 0.859]
Array 0–255[147, 112, 219]
Decimal integer9662683

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
Medium Purple on white3.76:1AA LargeLc 65Headings and large text
Medium Purple on black5.58:1AALc 37Non-text elements only

Medium Purple text on a white background

Medium Purple text on a black background

White text on Medium Purple

Black text on Medium Purple

Tonal scale

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

  • 50#f9f3ff
  • 100#f0e7ff
  • 200#e1d2ff
  • 300#ceb4ff
  • 400#b393fd
  • 500#9673de
  • 600#7c5abf
  • 700#6544a1
  • 800#513286
  • 900#40236f
  • 950#260c4a

Tints and shades

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

  • Tint 1#a488e2
  • Tint 2#b5a0e9
  • Tint 3#c7b8f0
  • Tint 4#d9d0f5
  • Tint 5#ece7fb
  • Shade 1#7256ac
  • Shade 2#533e7e
  • Shade 3#362754
  • Shade 4#1b122d
  • Shade 5#04020b

Colours that work with Medium Purple

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

  • #839300
  • #cd6a00
  • #00a286
  • #5c82e7
  • #b861ba

Closest CSS names

  • mediumpurpleexact match
  • mediumslateblueΔEok 0.054
  • mediumorchidΔEok 0.083
  • slateblueΔEok 0.090
  • cornflowerblueΔEok 0.104
  • royalblueΔEok 0.116