#40255E#40255E

#40255E is a dark, moderate violet. Relative luminance 0.032; OKLCH L 32.9% C 0.099 H 303.2°. Best body text is #FFFFFF at 12.77:1 contrast (WCAG AA passes).

Color values

HEX#40255E
RGBrgb(64, 37, 94)
HSLhsl(268, 44%, 26%)
HSVhsv(268, 61%, 37%)
CMYKcmyk(31.9%, 60.6%, 0%, 63.1%)
CIE-LABlab(20.91, 25.67, -29.39)
CIE-LCHlch(20.91, 39.02, 311.14°)
OKLaboklab(32.9% 0.0544 -0.083)
OKLCHoklch(32.9% 0.099 303.2)
XYZxyz(4.7958, 3.2213, 10.9566)
Luminance0.0322 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#40255E #435E25
analogous
#25265E #40255E #5C255E
triadic
#40255E #5E4025 #255E40
tetradic
#40255E #5E2526 #435E25 #255E5C
square
#40255E #5E2526 #435E25 #255E5C
split-complementary
#40255E #5E5C25 #265E25
monochromatic
#0F0916 #221432 #40255E #5E368A #7C48B6

Accessibility & contrast

On white

12.77
#40255E on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

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

Best text color

#FFFFFF on #40255E
12.77:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##40255E#FFFFFF#000000##FFFFFF
##40255E1.0012.771.6412.77
#FFFFFF12.771.0021.001.00
#0000001.6421.001.0021.00
##FFFFFF12.771.0021.001.00

Color blindness preview

Protanopia (red-blind)
#0E3260
Deuteranopia (green-blind)
#18325D
Tritanopia (blue-blind)
#3A303D
Achromatopsia (no color)
#323232

Design tokens & code

CSS
--color: #40255e;
/* rgb */ color: rgb(64, 37, 94);
/* oklch */ color: oklch(32.9% 0.099 303.2);
Tailwind
colors: {
  custom: {
    50: '#77618c',
    500: '#40255e',
    950: '#000000',
  },
}
SCSS
$custom: #40255e;
$custom-light: #77618c;
$custom-dark: #000000;
JSON
{
  "hex": "#40255e",
  "rgb": {
    "r": 64,
    "g": 37,
    "b": 94
  },
  "hsl": {
    "h": 268.421,
    "s": 43.511,
    "l": 25.686
  },
  "oklch": {
    "l": 0.32903,
    "c": 0.09921,
    "h": 303.2
  },
  "luminance": 0.03221
}

Semantic roles & 50–950 ramp

primary
#40255E
secondary
#71914D
accent
#D35597
background
#F7F5F8
surface
#EDE9F0
border
#C8C5CB
text
#09050C
muted
#7B797D

Preview Lab

Preview with #40255E

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

Preview Lab → · Contrast checker → · Palette generator →

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