#40277E#40277E

#40277E is a dark, vivid violet. Relative luminance 0.040; OKLCH L 35.8% C 0.139 H 290.9°. Best body text is #FFFFFF at 11.61:1 contrast (WCAG AA passes).

Color values

HEX#40277E
RGBrgb(64, 39, 126)
HSLhsl(257, 53%, 32%)
HSVhsv(257, 69%, 49%)
CMYKcmyk(49.2%, 69%, 0%, 50.6%)
CIE-LABlab(23.83, 33.90, -45.34)
CIE-LCHlch(23.83, 56.61, 306.78°)
OKLaboklab(35.8% 0.0496 -0.1299)
OKLCHoklch(35.8% 0.139 290.9)
XYZxyz(6.6047, 4.0471, 20.1678)
Luminance0.0405 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#40277E #657E27
analogous
#273A7E #40277E #6B277E
triadic
#40277E #7E4027 #277E40
tetradic
#40277E #7E273A #657E27 #277E6B
square
#40277E #7E273A #657E27 #277E6B
split-complementary
#40277E #7E6B27 #3A7E27
monochromatic
#110A21 #28194F #40277E #5835AD #7755CA

Accessibility & contrast

On white

11.61
#40277E on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

1.81
#40277E on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #40277E
11.61:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##40277E#FFFFFF#000000##FFFFFF
##40277E1.0011.611.8111.61
#FFFFFF11.611.0021.001.00
#0000001.8121.001.0021.00
##FFFFFF11.611.0021.001.00

Color blindness preview

Protanopia (red-blind)
#003A81
Deuteranopia (green-blind)
#00377C
Tritanopia (blue-blind)
#2C3C4F
Achromatopsia (no color)
#393939

Design tokens & code

CSS
--color: #40277e;
/* rgb */ color: rgb(64, 39, 126);
/* oklch */ color: oklch(35.8% 0.139 290.9);
Tailwind
colors: {
  custom: {
    50: '#7b63a4',
    500: '#40277e',
    950: '#000000',
  },
}
SCSS
$custom: #40277e;
$custom-light: #7b63a4;
$custom-dark: #000000;
JSON
{
  "hex": "#40277e",
  "rgb": {
    "r": 64,
    "g": 39,
    "b": 126
  },
  "hsl": {
    "h": 257.241,
    "s": 52.727,
    "l": 32.353
  },
  "oklch": {
    "l": 0.35803,
    "c": 0.13901,
    "h": 290.9
  },
  "luminance": 0.04047
}

Semantic roles & 50–950 ramp

primary
#40277E
secondary
#94AF52
accent
#DC4CB3
background
#F7F5FA
surface
#EEEAF4
border
#C9C6CE
text
#0A050F
muted
#7C797F

Preview Lab

Preview with #40277E

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

Preview Lab → · Contrast checker → · Palette generator →

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