#40277F#40277F

#40277F is a dark, vivid violet. Relative luminance 0.041; OKLCH L 35.9% C 0.140 H 290.6°. Best body text is #FFFFFF at 11.57:1 contrast (WCAG AA passes).

Color values

HEX#40277F
RGBrgb(64, 39, 127)
HSLhsl(257, 53%, 33%)
HSVhsv(257, 69%, 50%)
CMYKcmyk(49.6%, 69.3%, 0%, 50.2%)
CIE-LABlab(23.91, 34.20, -45.83)
CIE-LCHlch(23.91, 57.19, 306.73°)
OKLaboklab(35.89% 0.0494 -0.1313)
OKLCHoklch(35.89% 0.14 290.6)
XYZxyz(6.6696, 4.0731, 20.5093)
Luminance0.0407 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#40277F #667F27
analogous
#273A7F #40277F #6C277F
triadic
#40277F #7F4027 #277F40
tetradic
#40277F #7F273A #667F27 #277F6C
square
#40277F #7F273A #667F27 #277F6C
split-complementary
#40277F #7F6C27 #3A7F27
monochromatic
#110A21 #281950 #40277F #5835AE #7755CB

Accessibility & contrast

On white

11.57
#40277F on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

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

Best text color

#FFFFFF on #40277F
11.57:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##40277F#FFFFFF#000000##FFFFFF
##40277F1.0011.571.8111.57
#FFFFFF11.571.0021.001.00
#0000001.8121.001.0021.00
##FFFFFF11.571.0021.001.00

Color blindness preview

Protanopia (red-blind)
#003A82
Deuteranopia (green-blind)
#00377D
Tritanopia (blue-blind)
#2C3D4F
Achromatopsia (no color)
#393939

Design tokens & code

CSS
--color: #40277f;
/* rgb */ color: rgb(64, 39, 127);
/* oklch */ color: oklch(35.9% 0.140 290.6);
Tailwind
colors: {
  custom: {
    50: '#7b63a5',
    500: '#40277f',
    950: '#000000',
  },
}
SCSS
$custom: #40277f;
$custom-light: #7b63a5;
$custom-dark: #000000;
JSON
{
  "hex": "#40277f",
  "rgb": {
    "r": 64,
    "g": 39,
    "b": 127
  },
  "hsl": {
    "h": 257.045,
    "s": 53.012,
    "l": 32.549
  },
  "oklch": {
    "l": 0.35891,
    "c": 0.14031,
    "h": 290.6
  },
  "luminance": 0.04073
}

Semantic roles & 50–950 ramp

primary
#40277F
secondary
#95B052
accent
#DC4BB3
background
#F7F6FA
surface
#EEEBF4
border
#C9C6CE
text
#0A050F
muted
#7C7A7F

Preview Lab

Preview with #40277F

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

Preview Lab → · Contrast checker → · Palette generator →

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