#40255C#40255C

#40255C is a dark, moderate violet. Relative luminance 0.032; OKLCH L 32.8% C 0.096 H 304.3°. Best body text is #FFFFFF at 12.83:1 contrast (WCAG AA passes).

Color values

HEX#40255C
RGBrgb(64, 37, 92)
HSLhsl(269, 43%, 25%)
HSVhsv(269, 60%, 36%)
CMYKcmyk(30.4%, 59.8%, 0%, 63.9%)
CIE-LABlab(20.77, 25.11, -28.28)
CIE-LCHlch(20.77, 37.82, 311.60°)
OKLaboklab(32.76% 0.0543 -0.0797)
OKLCHoklch(32.76% 0.096 304.3)
XYZxyz(4.7073, 3.1858, 10.4901)
Luminance0.0319 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#40255C #415C25
analogous
#25255C #40255C #5C255C
triadic
#40255C #5C4025 #255C40
tetradic
#40255C #5C2525 #415C25 #255C5C
square
#40255C #5C2525 #415C25 #255C5C
split-complementary
#40255C #5C5C25 #255C25
monochromatic
#0F0916 #221330 #40255C #5E3788 #7D48B3

Accessibility & contrast

On white

12.83
#40255C on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

1.64
#40255C on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #40255C
12.83:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##40255C#FFFFFF#000000##FFFFFF
##40255C1.0012.831.6412.83
#FFFFFF12.831.0021.001.00
#0000001.6421.001.0021.00
##FFFFFF12.831.0021.001.00

Color blindness preview

Protanopia (red-blind)
#10315E
Deuteranopia (green-blind)
#1A325B
Tritanopia (blue-blind)
#3B303C
Achromatopsia (no color)
#323232

Design tokens & code

CSS
--color: #40255c;
/* rgb */ color: rgb(64, 37, 92);
/* oklch */ color: oklch(32.8% 0.096 304.3);
Tailwind
colors: {
  custom: {
    50: '#77618a',
    500: '#40255c',
    950: '#000000',
  },
}
SCSS
$custom: #40255c;
$custom-light: #77618a;
$custom-dark: #000000;
JSON
{
  "hex": "#40255c",
  "rgb": {
    "r": 64,
    "g": 37,
    "b": 92
  },
  "hsl": {
    "h": 269.455,
    "s": 42.636,
    "l": 25.294
  },
  "oklch": {
    "l": 0.32759,
    "c": 0.09648,
    "h": 304.3
  },
  "luminance": 0.03186
}

Semantic roles & 50–950 ramp

primary
#40255C
secondary
#6F8F4D
accent
#D25595
background
#F7F5F8
surface
#EDE9F0
border
#C8C5CB
text
#09050C
muted
#7B797D

Preview Lab

Preview with #40255C

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

Preview Lab → · Contrast checker → · Palette generator →

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