#40125D#40125D

#40125D is a dark, vivid violet. Relative luminance 0.023; OKLCH L 30.1% C 0.127 H 308.4°. Best body text is #FFFFFF at 14.36:1 contrast (WCAG AA passes).

Color values

HEX#40125D
RGBrgb(64, 18, 93)
HSLhsl(277, 68%, 22%)
HSVhsv(277, 81%, 36%)
CMYKcmyk(31.2%, 80.6%, 0%, 63.5%)
CIE-LABlab(17.05, 35.78, -34.94)
CIE-LCHlch(17.05, 50.02, 315.68°)
OKLaboklab(30.1% 0.0787 -0.0992)
OKLCHoklch(30.1% 0.127 308.4)
XYZxyz(4.3060, 2.3130, 10.5734)
Luminance0.0231 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#40125D #2F5D12
analogous
#1B125D #40125D #5D1255
triadic
#40125D #5D4012 #125D40
tetradic
#40125D #5D1B12 #2F5D12 #12555D
square
#40125D #5D1B12 #2F5D12 #12555D
split-complementary
#40125D #555D12 #125D1B
monochromatic
#12051A #1D082A #40125D #631C90 #8726C4

Accessibility & contrast

On white

14.36
#40125D on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

1.46
#40125D on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #40125D
14.36:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##40125D#FFFFFF#000000##FFFFFF
##40125D1.0014.361.4614.36
#FFFFFF14.361.0021.001.00
#0000001.4621.001.0021.00
##FFFFFF14.361.0021.001.00

Color blindness preview

Protanopia (red-blind)
#00285F
Deuteranopia (green-blind)
#002A5B
Tritanopia (blue-blind)
#3B2437
Achromatopsia (no color)
#2A2A2A

Design tokens & code

CSS
--color: #40125d;
/* rgb */ color: rgb(64, 18, 93);
/* oklch */ color: oklch(30.1% 0.127 308.4);
Tailwind
colors: {
  custom: {
    50: '#78558b',
    500: '#40125d',
    950: '#000000',
  },
}
SCSS
$custom: #40125d;
$custom-light: #78558b;
$custom-dark: #000000;
JSON
{
  "hex": "#40125d",
  "rgb": {
    "r": 64,
    "g": 18,
    "b": 93
  },
  "hsl": {
    "h": 276.8,
    "s": 67.568,
    "l": 21.765
  },
  "oklch": {
    "l": 0.30099,
    "c": 0.1266,
    "h": 308.4
  },
  "luminance": 0.02313
}

Semantic roles & 50–950 ramp

primary
#40125D
secondary
#5B9535
accent
#EA3D80
background
#F7F5F8
surface
#EEE9F0
border
#C9C5CB
text
#09030C
muted
#7B787D

Preview Lab

Preview with #40125D

Body copy rendered with the generated semantic roles for this colour.

Preview Lab → · Contrast checker → · Palette generator →

#40125D Color — HEX, RGB, HSL, OKLCH & Contrast — Tintiva