#40125B#40125B

#40125B is a dark, vivid violet. Relative luminance 0.023; OKLCH L 29.9% C 0.124 H 309.5°. Best body text is #FFFFFF at 14.43:1 contrast (WCAG AA passes).

Color values

HEX#40125B
RGBrgb(64, 18, 91)
HSLhsl(278, 67%, 21%)
HSVhsv(278, 80%, 36%)
CMYKcmyk(29.7%, 80.2%, 0%, 64.3%)
CIE-LABlab(16.88, 35.29, -33.88)
CIE-LCHlch(16.88, 48.92, 316.17°)
OKLaboklab(29.93% 0.0791 -0.0961)
OKLCHoklch(29.93% 0.124 309.5)
XYZxyz(4.2186, 2.2780, 10.1130)
Luminance0.0228 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#40125B #2D5B12
analogous
#1C125B #40125B #5B1252
triadic
#40125B #5B4012 #125B40
tetradic
#40125B #5B1C12 #2D5B12 #12525B
square
#40125B #5B1C12 #2D5B12 #12525B
split-complementary
#40125B #525B12 #125B1C
monochromatic
#12051A #1C0828 #40125B #641C8E #8826C1

Accessibility & contrast

On white

14.43
#40125B on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

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

Best text color

#FFFFFF on #40125B
14.43:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##40125B#FFFFFF#000000##FFFFFF
##40125B1.0014.431.4614.43
#FFFFFF14.431.0021.001.00
#0000001.4621.001.0021.00
##FFFFFF14.431.0021.001.00

Color blindness preview

Protanopia (red-blind)
#00285D
Deuteranopia (green-blind)
#012A59
Tritanopia (blue-blind)
#3C2335
Achromatopsia (no color)
#2A2A2A

Design tokens & code

CSS
--color: #40125b;
/* rgb */ color: rgb(64, 18, 91);
/* oklch */ color: oklch(29.9% 0.124 309.5);
Tailwind
colors: {
  custom: {
    50: '#78558a',
    500: '#40125b',
    950: '#000000',
  },
}
SCSS
$custom: #40125b;
$custom-light: #78558a;
$custom-dark: #000000;
JSON
{
  "hex": "#40125b",
  "rgb": {
    "r": 64,
    "g": 18,
    "b": 91
  },
  "hsl": {
    "h": 277.808,
    "s": 66.972,
    "l": 21.373
  },
  "oklch": {
    "l": 0.29929,
    "c": 0.12443,
    "h": 309.5
  },
  "luminance": 0.02278
}

Semantic roles & 50–950 ramp

primary
#40125B
secondary
#589335
accent
#EA3E7E
background
#F7F5F8
surface
#EEE9F0
border
#C9C5CB
text
#09030C
muted
#7B787D

Preview Lab

Preview with #40125B

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

Preview Lab → · Contrast checker → · Palette generator →

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