#40277A#40277A

#40277A is a dark, vivid violet. Relative luminance 0.039; OKLCH L 35.5% C 0.134 H 292.0°. Best body text is #FFFFFF at 11.74:1 contrast (WCAG AA passes).

Color values

HEX#40277A
RGBrgb(64, 39, 122)
HSLhsl(258, 52%, 32%)
HSVhsv(258, 68%, 48%)
CMYKcmyk(47.5%, 68%, 0%, 52.2%)
CIE-LABlab(23.49, 32.68, -43.35)
CIE-LCHlch(23.49, 54.29, 307.01°)
OKLaboklab(35.46% 0.0501 -0.124)
OKLCHoklch(35.46% 0.134 292)
XYZxyz(6.3517, 3.9460, 18.8356)
Luminance0.0395 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#40277A #617A27
analogous
#27387A #40277A #6A277A
triadic
#40277A #7A4027 #277A40
tetradic
#40277A #7A2738 #617A27 #277A6A
square
#40277A #7A2738 #617A27 #277A6A
split-complementary
#40277A #7A6A27 #387A27
monochromatic
#0F091D #28184C #40277A #5836A8 #7653C8

Accessibility & contrast

On white

11.74
#40277A on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

1.79
#40277A on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #40277A
11.74:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##40277A#FFFFFF#000000##FFFFFF
##40277A1.0011.741.7911.74
#FFFFFF11.741.0021.001.00
#0000001.7921.001.0021.00
##FFFFFF11.741.0021.001.00

Color blindness preview

Protanopia (red-blind)
#00397D
Deuteranopia (green-blind)
#003678
Tritanopia (blue-blind)
#2F3B4D
Achromatopsia (no color)
#383838

Design tokens & code

CSS
--color: #40277a;
/* rgb */ color: rgb(64, 39, 122);
/* oklch */ color: oklch(35.5% 0.134 292.0);
Tailwind
colors: {
  custom: {
    50: '#7a63a1',
    500: '#40277a',
    950: '#000000',
  },
}
SCSS
$custom: #40277a;
$custom-light: #7a63a1;
$custom-dark: #000000;
JSON
{
  "hex": "#40277a",
  "rgb": {
    "r": 64,
    "g": 39,
    "b": 122
  },
  "hsl": {
    "h": 258.072,
    "s": 51.553,
    "l": 31.569
  },
  "oklch": {
    "l": 0.35457,
    "c": 0.13377,
    "h": 292
  },
  "luminance": 0.03946
}

Semantic roles & 50–950 ramp

primary
#40277A
secondary
#91AC51
accent
#DB4DB0
background
#F7F5FA
surface
#EEEAF3
border
#C9C6CD
text
#0A050F
muted
#7C797F

Preview Lab

Preview with #40277A

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

Preview Lab → · Contrast checker → · Palette generator →

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