#40255A#40255A

#40255A is a dark, moderate violet. Relative luminance 0.032; OKLCH L 32.6% C 0.094 H 305.3°. Best body text is #FFFFFF at 12.88:1 contrast (WCAG AA passes).

Color values

HEX#40255A
RGBrgb(64, 37, 90)
HSLhsl(271, 42%, 25%)
HSVhsv(271, 59%, 35%)
CMYKcmyk(28.9%, 58.9%, 0%, 64.7%)
CIE-LABlab(20.64, 24.56, -27.17)
CIE-LCHlch(20.64, 36.62, 312.11°)
OKLaboklab(32.62% 0.0542 -0.0765)
OKLCHoklch(32.62% 0.094 305.3)
XYZxyz(4.6210, 3.1513, 10.0357)
Luminance0.0315 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#40255A #3F5A25
analogous
#26255A #40255A #5A2559
triadic
#40255A #5A4025 #255A40
tetradic
#40255A #5A2625 #3F5A25 #25595A
square
#40255A #5A2625 #3F5A25 #25595A
split-complementary
#40255A #595A25 #255A26
monochromatic
#0F0916 #21132F #40255A #5F3785 #7E49B1

Accessibility & contrast

On white

12.88
#40255A on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

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

Best text color

#FFFFFF on #40255A
12.88:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##40255A#FFFFFF#000000##FFFFFF
##40255A1.0012.881.6312.88
#FFFFFF12.881.0021.001.00
#0000001.6321.001.0021.00
##FFFFFF12.881.0021.001.00

Color blindness preview

Protanopia (red-blind)
#13315C
Deuteranopia (green-blind)
#1C3259
Tritanopia (blue-blind)
#3C2F3B
Achromatopsia (no color)
#323232

Design tokens & code

CSS
--color: #40255a;
/* rgb */ color: rgb(64, 37, 90);
/* oklch */ color: oklch(32.6% 0.094 305.3);
Tailwind
colors: {
  custom: {
    50: '#776089',
    500: '#40255a',
    950: '#000000',
  },
}
SCSS
$custom: #40255a;
$custom-light: #776089;
$custom-dark: #000000;
JSON
{
  "hex": "#40255a",
  "rgb": {
    "r": 64,
    "g": 37,
    "b": 90
  },
  "hsl": {
    "h": 270.566,
    "s": 41.732,
    "l": 24.902
  },
  "oklch": {
    "l": 0.32618,
    "c": 0.09375,
    "h": 305.3
  },
  "luminance": 0.03151
}

Semantic roles & 50–950 ramp

primary
#40255A
secondary
#6D8D4D
accent
#D25693
background
#F7F5F8
surface
#EDE9F0
border
#C8C5CB
text
#09050B
muted
#7B797C

Preview Lab

Preview with #40255A

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

Preview Lab → · Contrast checker → · Palette generator →

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