#40127F#40127F

#40127F is a dark, vivid violet. Relative luminance 0.031; OKLCH L 33.3% C 0.163 H 294.5°. Best body text is #FFFFFF at 13.04:1 contrast (WCAG AA passes).

Color values

HEX#40127F
RGBrgb(64, 18, 127)
HSLhsl(265, 75%, 28%)
HSVhsv(265, 86%, 50%)
CMYKcmyk(49.6%, 85.8%, 0%, 50.2%)
CIE-LABlab(20.26, 44.54, -51.81)
CIE-LCHlch(20.26, 68.33, 310.69°)
OKLaboklab(33.32% 0.0679 -0.1487)
OKLCHoklch(33.32% 0.163 294.5)
XYZxyz(6.1604, 3.0547, 20.3396)
Luminance0.0306 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#40127F #517F12
analogous
#121B7F #40127F #76127F
triadic
#40127F #7F4012 #127F40
tetradic
#40127F #7F121B #517F12 #127F76
square
#40127F #7F121B #517F12 #127F76
split-complementary
#40127F #7F7612 #1B7F12
monochromatic
#0E041B #250A49 #40127F #5B1AB5 #772BE1

Accessibility & contrast

On white

13.04
#40127F on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

1.61
#40127F on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #40127F
13.04:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##40127F#FFFFFF#000000##FFFFFF
##40127F1.0013.041.6113.04
#FFFFFF13.041.0021.001.00
#0000001.6121.001.0021.00
##FFFFFF13.041.0021.001.00

Color blindness preview

Protanopia (red-blind)
#003282
Deuteranopia (green-blind)
#002F7D
Tritanopia (blue-blind)
#2D334A
Achromatopsia (no color)
#313131

Design tokens & code

CSS
--color: #40127f;
/* rgb */ color: rgb(64, 18, 127);
/* oklch */ color: oklch(33.3% 0.163 294.5);
Tailwind
colors: {
  custom: {
    50: '#7d58a5',
    500: '#40127f',
    950: '#000000',
  },
}
SCSS
$custom: #40127f;
$custom-light: #7d58a5;
$custom-dark: #000000;
JSON
{
  "hex": "#40127f",
  "rgb": {
    "r": 64,
    "g": 18,
    "b": 127
  },
  "hsl": {
    "h": 265.321,
    "s": 75.172,
    "l": 28.431
  },
  "oklch": {
    "l": 0.3332,
    "c": 0.16346,
    "h": 294.5
  },
  "luminance": 0.03055
}

Semantic roles & 50–950 ramp

primary
#40127F
secondary
#80B538
accent
#F236A3
background
#F8F5FA
surface
#EFE9F4
border
#CAC5CE
text
#0A040F
muted
#7C797F

Preview Lab

Preview with #40127F

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

Preview Lab → · Contrast checker → · Palette generator →

#40127F Color — HEX, RGB, HSL, OKLCH & Contrast — Tintiva