#40155A#40155A

#40155A is a dark, moderate violet. Relative luminance 0.024; OKLCH L 30.2% C 0.119 H 309.5°. Best body text is #FFFFFF at 14.26:1 contrast (WCAG AA passes).

Color values

HEX#40155A
RGBrgb(64, 21, 90)
HSLhsl(277, 62%, 22%)
HSVhsv(277, 77%, 35%)
CMYKcmyk(28.9%, 76.7%, 0%, 64.7%)
CIE-LABlab(17.29, 33.64, -32.54)
CIE-LCHlch(17.29, 46.81, 315.95°)
OKLaboklab(30.19% 0.076 -0.0922)
OKLCHoklch(30.19% 0.119 309.5)
XYZxyz(4.2276, 2.3646, 9.9046)
Luminance0.0237 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#40155A #2F5A15
analogous
#1E155A #40155A #5A1552
triadic
#40155A #5A4015 #155A40
tetradic
#40155A #5A1E15 #2F5A15 #15525A
square
#40155A #5A1E15 #2F5A15 #15525A
split-complementary
#40155A #525A15 #155A1E
monochromatic
#120619 #1D0928 #40155A #63218C #872CBD

Accessibility & contrast

On white

14.26
#40155A on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

1.47
#40155A on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #40155A
14.26:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##40155A#FFFFFF#000000##FFFFFF
##40155A1.0014.261.4714.26
#FFFFFF14.261.0021.001.00
#0000001.4721.001.0021.00
##FFFFFF14.261.0021.001.00

Color blindness preview

Protanopia (red-blind)
#00295C
Deuteranopia (green-blind)
#072B59
Tritanopia (blue-blind)
#3C2436
Achromatopsia (no color)
#2A2A2A

Design tokens & code

CSS
--color: #40155a;
/* rgb */ color: rgb(64, 21, 90);
/* oklch */ color: oklch(30.2% 0.119 309.5);
Tailwind
colors: {
  custom: {
    50: '#785789',
    500: '#40155a',
    950: '#000000',
  },
}
SCSS
$custom: #40155a;
$custom-light: #785789;
$custom-dark: #000000;
JSON
{
  "hex": "#40155a",
  "rgb": {
    "r": 64,
    "g": 21,
    "b": 90
  },
  "hsl": {
    "h": 277.391,
    "s": 62.162,
    "l": 21.765
  },
  "oklch": {
    "l": 0.30194,
    "c": 0.11943,
    "h": 309.5
  },
  "luminance": 0.02365
}

Semantic roles & 50–950 ramp

primary
#40155A
secondary
#5B9239
accent
#E54380
background
#F7F5F8
surface
#EDE9F0
border
#C8C5CB
text
#09030B
muted
#7B787C

Preview Lab

Preview with #40155A

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

Preview Lab → · Contrast checker → · Palette generator →

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