#40145C#40145C

#40145C is a dark, vivid violet. Relative luminance 0.024; OKLCH L 30.2% C 0.123 H 308.6°. Best body text is #FFFFFF at 14.26:1 contrast (WCAG AA passes).

Color values

HEX#40145C
RGBrgb(64, 20, 92)
HSLhsl(277, 64%, 22%)
HSVhsv(277, 78%, 36%)
CMYKcmyk(30.4%, 78.3%, 0%, 63.9%)
CIE-LABlab(17.29, 34.62, -33.89)
CIE-LCHlch(17.29, 48.45, 315.61°)
OKLaboklab(30.24% 0.0767 -0.0961)
OKLCHoklch(30.24% 0.123 308.6)
XYZxyz(4.2959, 2.3631, 10.3530)
Luminance0.0236 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#40145C #305C14
analogous
#1C145C #40145C #5C1454
triadic
#40145C #5C4014 #145C40
tetradic
#40145C #5C1C14 #305C14 #14545C
square
#40145C #5C1C14 #305C14 #14545C
split-complementary
#40145C #545C14 #145C1C
monochromatic
#110519 #1D092A #40145C #631F8E #862AC1

Accessibility & contrast

On white

14.26
#40145C on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

1.47
#40145C on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #40145C
14.26:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##40145C#FFFFFF#000000##FFFFFF
##40145C1.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)
#00295E
Deuteranopia (green-blind)
#012B5A
Tritanopia (blue-blind)
#3C2537
Achromatopsia (no color)
#2A2A2A

Design tokens & code

CSS
--color: #40145c;
/* rgb */ color: rgb(64, 20, 92);
/* oklch */ color: oklch(30.2% 0.123 308.6);
Tailwind
colors: {
  custom: {
    50: '#78568b',
    500: '#40145c',
    950: '#000000',
  },
}
SCSS
$custom: #40145c;
$custom-light: #78568b;
$custom-dark: #000000;
JSON
{
  "hex": "#40145c",
  "rgb": {
    "r": 64,
    "g": 20,
    "b": 92
  },
  "hsl": {
    "h": 276.667,
    "s": 64.286,
    "l": 21.961
  },
  "oklch": {
    "l": 0.30241,
    "c": 0.12299,
    "h": 308.6
  },
  "luminance": 0.02363
}

Semantic roles & 50–950 ramp

primary
#40145C
secondary
#5C9438
accent
#E74181
background
#F7F5F8
surface
#EEE9F0
border
#C9C5CB
text
#09030C
muted
#7B787D

Preview Lab

Preview with #40145C

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

Preview Lab → · Contrast checker → · Palette generator →

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