#40257E#40257E

#40257E is a dark, vivid violet. Relative luminance 0.039; OKLCH L 35.5% C 0.142 H 291.4°. Best body text is #FFFFFF at 11.77:1 contrast (WCAG AA passes).

Color values

HEX#40257E
RGBrgb(64, 37, 126)
HSLhsl(258, 55%, 32%)
HSVhsv(258, 71%, 49%)
CMYKcmyk(49.2%, 70.6%, 0%, 50.6%)
CIE-LABlab(23.40, 35.06, -46.03)
CIE-LCHlch(23.40, 57.86, 307.29°)
OKLaboklab(35.5% 0.0517 -0.1319)
OKLCHoklch(35.5% 0.142 291.4)
XYZxyz(6.5408, 3.9192, 20.1465)
Luminance0.0392 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#40257E #637E25
analogous
#25377E #40257E #6D257E
triadic
#40257E #7E4025 #257E40
tetradic
#40257E #7E2537 #637E25 #257E6D
square
#40257E #7E2537 #637E25 #257E6D
split-complementary
#40257E #7E6D25 #377E25
monochromatic
#10091F #28174F #40257E #5833AD #7751CC

Accessibility & contrast

On white

11.77
#40257E on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

1.78
#40257E on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #40257E
11.77:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##40257E#FFFFFF#000000##FFFFFF
##40257E1.0011.771.7811.77
#FFFFFF11.771.0021.001.00
#0000001.7821.001.0021.00
##FFFFFF11.771.0021.001.00

Color blindness preview

Protanopia (red-blind)
#003981
Deuteranopia (green-blind)
#00367C
Tritanopia (blue-blind)
#2C3B4E
Achromatopsia (no color)
#383838

Design tokens & code

CSS
--color: #40257e;
/* rgb */ color: rgb(64, 37, 126);
/* oklch */ color: oklch(35.5% 0.142 291.4);
Tailwind
colors: {
  custom: {
    50: '#7b62a4',
    500: '#40257e',
    950: '#000000',
  },
}
SCSS
$custom: #40257e;
$custom-light: #7b62a4;
$custom-dark: #000000;
JSON
{
  "hex": "#40257e",
  "rgb": {
    "r": 64,
    "g": 37,
    "b": 126
  },
  "hsl": {
    "h": 258.202,
    "s": 54.601,
    "l": 31.961
  },
  "oklch": {
    "l": 0.35499,
    "c": 0.14167,
    "h": 291.4
  },
  "luminance": 0.03919
}

Semantic roles & 50–950 ramp

primary
#40257E
secondary
#93B04F
accent
#DE4AB1
background
#F7F5FA
surface
#EEEAF4
border
#C9C6CE
text
#0A050F
muted
#7C797F

Preview Lab

Preview with #40257E

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

Preview Lab → · Contrast checker → · Palette generator →

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