#40155F#40155F

#40155F is a dark, vivid violet. Relative luminance 0.025; OKLCH L 30.6% C 0.125 H 306.9°. Best body text is #FFFFFF at 14.09:1 contrast (WCAG AA passes).

Color values

HEX#40155F
RGBrgb(64, 21, 95)
HSLhsl(275, 64%, 23%)
HSVhsv(275, 78%, 37%)
CMYKcmyk(32.6%, 77.9%, 0%, 62.7%)
CIE-LABlab(17.70, 34.91, -35.22)
CIE-LCHlch(17.70, 49.59, 314.74°)
OKLaboklab(30.61% 0.0751 -0.1)
OKLCHoklch(30.61% 0.125 306.9)
XYZxyz(4.4476, 2.4526, 11.0633)
Luminance0.0245 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#40155F #345F15
analogous
#1B155F #40155F #5F1559
triadic
#40155F #5F4015 #155F40
tetradic
#40155F #5F1B15 #345F15 #15595F
square
#40155F #5F1B15 #345F15 #15595F
split-complementary
#40155F #595F15 #155F1B
monochromatic
#110619 #1E0A2D #40155F #622091 #842BC3

Accessibility & contrast

On white

14.09
#40155F on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

1.49
#40155F on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #40155F
14.09:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##40155F#FFFFFF#000000##FFFFFF
##40155F1.0014.091.4914.09
#FFFFFF14.091.0021.001.00
#0000001.4921.001.0021.00
##FFFFFF14.091.0021.001.00

Color blindness preview

Protanopia (red-blind)
#002A61
Deuteranopia (green-blind)
#002C5D
Tritanopia (blue-blind)
#3B2738
Achromatopsia (no color)
#2B2B2B

Design tokens & code

CSS
--color: #40155f;
/* rgb */ color: rgb(64, 21, 95);
/* oklch */ color: oklch(30.6% 0.125 306.9);
Tailwind
colors: {
  custom: {
    50: '#78578d',
    500: '#40155f',
    950: '#000000',
  },
}
SCSS
$custom: #40155f;
$custom-light: #78578d;
$custom-dark: #000000;
JSON
{
  "hex": "#40155f",
  "rgb": {
    "r": 64,
    "g": 21,
    "b": 95
  },
  "hsl": {
    "h": 274.865,
    "s": 63.793,
    "l": 22.745
  },
  "oklch": {
    "l": 0.30613,
    "c": 0.12505,
    "h": 306.9
  },
  "luminance": 0.02453
}

Semantic roles & 50–950 ramp

primary
#40155F
secondary
#60963A
accent
#E74186
background
#F7F5F8
surface
#EEE9F0
border
#C9C5CB
text
#09030C
muted
#7B787D

Preview Lab

Preview with #40155F

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

Preview Lab → · Contrast checker → · Palette generator →

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