#40256A#40256A

#40256A is a dark, moderate violet. Relative luminance 0.035; OKLCH L 33.8% C 0.115 H 298.0°. Best body text is #FFFFFF at 12.42:1 contrast (WCAG AA passes).

Color values

HEX#40256A
RGBrgb(64, 37, 106)
HSLhsl(263, 48%, 28%)
HSVhsv(263, 65%, 42%)
CMYKcmyk(39.6%, 65.1%, 0%, 58.4%)
CIE-LABlab(21.78, 29.11, -35.85)
CIE-LCHlch(21.78, 46.18, 309.08°)
OKLaboklab(33.81% 0.0541 -0.102)
OKLCHoklch(33.81% 0.115 298)
XYZxyz(5.3768, 3.4537, 14.0162)
Luminance0.0345 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#40256A #4F6A25
analogous
#252C6A #40256A #62256A
triadic
#40256A #6A4025 #256A40
tetradic
#40256A #6A252C #4F6A25 #256A62
square
#40256A #6A252C #4F6A25 #256A62
split-complementary
#40256A #6A6225 #2C6A25
monochromatic
#0E0817 #25153D #40256A #5B3597 #784AC0

Accessibility & contrast

On white

12.42
#40256A on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

1.69
#40256A on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #40256A
12.42:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##40256A#FFFFFF#000000##FFFFFF
##40256A1.0012.421.6912.42
#FFFFFF12.421.0021.001.00
#0000001.6921.001.0021.00
##FFFFFF12.421.0021.001.00

Color blindness preview

Protanopia (red-blind)
#00346C
Deuteranopia (green-blind)
#063368
Tritanopia (blue-blind)
#363443
Achromatopsia (no color)
#343434

Design tokens & code

CSS
--color: #40256a;
/* rgb */ color: rgb(64, 37, 106);
/* oklch */ color: oklch(33.8% 0.115 298.0);
Tailwind
colors: {
  custom: {
    50: '#786195',
    500: '#40256a',
    950: '#000000',
  },
}
SCSS
$custom: #40256a;
$custom-light: #786195;
$custom-dark: #000000;
JSON
{
  "hex": "#40256a",
  "rgb": {
    "r": 64,
    "g": 37,
    "b": 106
  },
  "hsl": {
    "h": 263.478,
    "s": 48.252,
    "l": 28.039
  },
  "oklch": {
    "l": 0.33814,
    "c": 0.11544,
    "h": 298
  },
  "luminance": 0.03454
}

Semantic roles & 50–950 ramp

primary
#40256A
secondary
#7E9D4E
accent
#D850A3
background
#F7F5F9
surface
#EEEAF2
border
#C9C6CC
text
#09050D
muted
#7B797E

Preview Lab

Preview with #40256A

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

Preview Lab → · Contrast checker → · Palette generator →

#40256A Color — HEX, RGB, HSL, OKLCH & Contrast — Tintiva