#40255B#40255B

#40255B is a dark, moderate violet. Relative luminance 0.032; OKLCH L 32.7% C 0.095 H 304.8°. Best body text is #FFFFFF at 12.86:1 contrast (WCAG AA passes).

Color values

HEX#40255B
RGBrgb(64, 37, 91)
HSLhsl(270, 42%, 25%)
HSVhsv(270, 59%, 36%)
CMYKcmyk(29.7%, 59.3%, 0%, 64.3%)
CIE-LABlab(20.71, 24.83, -27.73)
CIE-LCHlch(20.71, 37.22, 311.85°)
OKLaboklab(32.69% 0.0543 -0.0781)
OKLCHoklch(32.69% 0.095 304.8)
XYZxyz(4.6638, 3.1685, 10.2614)
Luminance0.0317 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#40255B #405B25
analogous
#25255B #40255B #5B255B
triadic
#40255B #5B4025 #255B40
tetradic
#40255B #5B2525 #405B25 #255B5B
square
#40255B #5B2525 #405B25 #255B5B
split-complementary
#40255B #5B5B25 #255B25
monochromatic
#0F0916 #21132F #40255B #5F3787 #7D48B2

Accessibility & contrast

On white

12.86
#40255B on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

1.63
#40255B on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #40255B
12.86:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##40255B#FFFFFF#000000##FFFFFF
##40255B1.0012.861.6312.86
#FFFFFF12.861.0021.001.00
#0000001.6321.001.0021.00
##FFFFFF12.861.0021.001.00

Color blindness preview

Protanopia (red-blind)
#12315D
Deuteranopia (green-blind)
#1B325A
Tritanopia (blue-blind)
#3B2F3C
Achromatopsia (no color)
#323232

Design tokens & code

CSS
--color: #40255b;
/* rgb */ color: rgb(64, 37, 91);
/* oklch */ color: oklch(32.7% 0.095 304.8);
Tailwind
colors: {
  custom: {
    50: '#77608a',
    500: '#40255b',
    950: '#000000',
  },
}
SCSS
$custom: #40255b;
$custom-light: #77608a;
$custom-dark: #000000;
JSON
{
  "hex": "#40255b",
  "rgb": {
    "r": 64,
    "g": 37,
    "b": 91
  },
  "hsl": {
    "h": 270,
    "s": 42.188,
    "l": 25.098
  },
  "oklch": {
    "l": 0.32689,
    "c": 0.09511,
    "h": 304.8
  },
  "luminance": 0.03168
}

Semantic roles & 50–950 ramp

primary
#40255B
secondary
#6E8E4D
accent
#D25694
background
#F7F5F8
surface
#EDE9F0
border
#C8C5CB
text
#09050B
muted
#7B797C

Preview Lab

Preview with #40255B

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

Preview Lab → · Contrast checker → · Palette generator →

#40255B Color — HEX, RGB, HSL, OKLCH & Contrast — Tintiva