#40125A#40125A

#40125A is a dark, vivid violet. Relative luminance 0.023; OKLCH L 29.8% C 0.123 H 310.0°. Best body text is #FFFFFF at 14.46:1 contrast (WCAG AA passes).

Color values

HEX#40125A
RGBrgb(64, 18, 90)
HSLhsl(278, 67%, 21%)
HSVhsv(278, 80%, 35%)
CMYKcmyk(28.9%, 80%, 0%, 64.7%)
CIE-LABlab(16.80, 35.05, -33.34)
CIE-LCHlch(16.80, 48.37, 316.43°)
OKLaboklab(29.84% 0.0793 -0.0945)
OKLCHoklch(29.84% 0.123 310)
XYZxyz(4.1758, 2.2609, 9.8873)
Luminance0.0226 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#40125A #2C5A12
analogous
#1C125A #40125A #5A1250
triadic
#40125A #5A4012 #125A40
tetradic
#40125A #5A1C12 #2C5A12 #12505A
square
#40125A #5A1C12 #2C5A12 #12505A
split-complementary
#40125A #505A12 #125A1C
monochromatic
#12051A #1C0827 #40125A #641C8D #8926C0

Accessibility & contrast

On white

14.46
#40125A on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

1.45
#40125A on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #40125A
14.46:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##40125A#FFFFFF#000000##FFFFFF
##40125A1.0014.461.4514.46
#FFFFFF14.461.0021.001.00
#0000001.4521.001.0021.00
##FFFFFF14.461.0021.001.00

Color blindness preview

Protanopia (red-blind)
#00285C
Deuteranopia (green-blind)
#022A58
Tritanopia (blue-blind)
#3C2335
Achromatopsia (no color)
#292929

Design tokens & code

CSS
--color: #40125a;
/* rgb */ color: rgb(64, 18, 90);
/* oklch */ color: oklch(29.8% 0.123 310.0);
Tailwind
colors: {
  custom: {
    50: '#785589',
    500: '#40125a',
    950: '#000000',
  },
}
SCSS
$custom: #40125a;
$custom-light: #785589;
$custom-dark: #000000;
JSON
{
  "hex": "#40125a",
  "rgb": {
    "r": 64,
    "g": 18,
    "b": 90
  },
  "hsl": {
    "h": 278.333,
    "s": 66.667,
    "l": 21.176
  },
  "oklch": {
    "l": 0.29844,
    "c": 0.12334,
    "h": 310
  },
  "luminance": 0.02261
}

Semantic roles & 50–950 ramp

primary
#40125A
secondary
#579335
accent
#EA3E7C
background
#F7F5F8
surface
#EEE9F0
border
#C9C5CB
text
#09030B
muted
#7B787C

Preview Lab

Preview with #40125A

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

Preview Lab → · Contrast checker → · Palette generator →

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