#40125E#40125E

#40125E is a dark, vivid violet. Relative luminance 0.023; OKLCH L 30.2% C 0.128 H 307.9°. Best body text is #FFFFFF at 14.32:1 contrast (WCAG AA passes).

Color values

HEX#40125E
RGBrgb(64, 18, 94)
HSLhsl(276, 68%, 22%)
HSVhsv(276, 81%, 37%)
CMYKcmyk(31.9%, 80.9%, 0%, 63.1%)
CIE-LABlab(17.14, 36.03, -35.47)
CIE-LCHlch(17.14, 50.56, 315.45°)
OKLaboklab(30.19% 0.0784 -0.1008)
OKLCHoklch(30.19% 0.128 307.9)
XYZxyz(4.3506, 2.3308, 10.8082)
Luminance0.0233 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#40125E #305E12
analogous
#1A125E #40125E #5E1256
triadic
#40125E #5E4012 #125E40
tetradic
#40125E #5E1A12 #305E12 #12565E
square
#40125E #5E1A12 #305E12 #12565E
split-complementary
#40125E #565E12 #125E1A
monochromatic
#11051A #1D082B #40125E #631C91 #8626C5

Accessibility & contrast

On white

14.32
#40125E on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

1.47
#40125E on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #40125E
14.32:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##40125E#FFFFFF#000000##FFFFFF
##40125E1.0014.321.4714.32
#FFFFFF14.321.0021.001.00
#0000001.4721.001.0021.00
##FFFFFF14.321.0021.001.00

Color blindness preview

Protanopia (red-blind)
#002960
Deuteranopia (green-blind)
#002B5C
Tritanopia (blue-blind)
#3B2537
Achromatopsia (no color)
#2A2A2A

Design tokens & code

CSS
--color: #40125e;
/* rgb */ color: rgb(64, 18, 94);
/* oklch */ color: oklch(30.2% 0.128 307.9);
Tailwind
colors: {
  custom: {
    50: '#78558c',
    500: '#40125e',
    950: '#000000',
  },
}
SCSS
$custom: #40125e;
$custom-light: #78558c;
$custom-dark: #000000;
JSON
{
  "hex": "#40125e",
  "rgb": {
    "r": 64,
    "g": 18,
    "b": 94
  },
  "hsl": {
    "h": 276.316,
    "s": 67.857,
    "l": 21.961
  },
  "oklch": {
    "l": 0.30186,
    "c": 0.12769,
    "h": 307.9
  },
  "luminance": 0.02331
}

Semantic roles & 50–950 ramp

primary
#40125E
secondary
#5C9635
accent
#EB3D82
background
#F7F5F8
surface
#EEE9F0
border
#C9C5CB
text
#09030C
muted
#7B787D

Preview Lab

Preview with #40125E

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

Preview Lab → · Contrast checker → · Palette generator →

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