#40267F#40267F

#40267F is a dark, vivid violet. Relative luminance 0.040; OKLCH L 35.7% C 0.142 H 290.9°. Best body text is #FFFFFF at 11.66:1 contrast (WCAG AA passes).

Color values

HEX#40267F
RGBrgb(64, 38, 127)
HSLhsl(258, 54%, 32%)
HSVhsv(258, 70%, 50%)
CMYKcmyk(49.6%, 70.1%, 0%, 50.2%)
CIE-LABlab(23.70, 34.78, -46.18)
CIE-LCHlch(23.70, 57.81, 306.99°)
OKLaboklab(35.74% 0.0505 -0.1323)
OKLCHoklch(35.74% 0.142 290.9)
XYZxyz(6.6371, 4.0083, 20.4985)
Luminance0.0401 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#40267F #657F26
analogous
#26397F #40267F #6C267F
triadic
#40267F #7F4026 #267F40
tetradic
#40267F #7F2639 #657F26 #267F6C
square
#40267F #7F2639 #657F26 #267F6C
split-complementary
#40267F #7F6C26 #397F26
monochromatic
#110A21 #281850 #40267F #5834AE #7754CC

Accessibility & contrast

On white

11.66
#40267F on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

1.80
#40267F on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #40267F
11.66:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##40267F#FFFFFF#000000##FFFFFF
##40267F1.0011.661.8011.66
#FFFFFF11.661.0021.001.00
#0000001.8021.001.0021.00
##FFFFFF11.661.0021.001.00

Color blindness preview

Protanopia (red-blind)
#003A82
Deuteranopia (green-blind)
#00367D
Tritanopia (blue-blind)
#2C3C4F
Achromatopsia (no color)
#383838

Design tokens & code

CSS
--color: #40267f;
/* rgb */ color: rgb(64, 38, 127);
/* oklch */ color: oklch(35.7% 0.142 290.9);
Tailwind
colors: {
  custom: {
    50: '#7b62a5',
    500: '#40267f',
    950: '#000000',
  },
}
SCSS
$custom: #40267f;
$custom-light: #7b62a5;
$custom-dark: #000000;
JSON
{
  "hex": "#40267f",
  "rgb": {
    "r": 64,
    "g": 38,
    "b": 127
  },
  "hsl": {
    "h": 257.528,
    "s": 53.939,
    "l": 32.353
  },
  "oklch": {
    "l": 0.35738,
    "c": 0.14163,
    "h": 290.9
  },
  "luminance": 0.04009
}

Semantic roles & 50–950 ramp

primary
#40267F
secondary
#94B051
accent
#DD4AB2
background
#F7F5FA
surface
#EEEAF4
border
#C9C6CE
text
#0A050F
muted
#7C797F

Preview Lab

Preview with #40267F

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

Preview Lab → · Contrast checker → · Palette generator →

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