#40107E#40107E

#40107E is a dark, vivid violet. Relative luminance 0.030; OKLCH L 33.0% C 0.164 H 295.1°. Best body text is #FFFFFF at 13.18:1 contrast (WCAG AA passes).

Color values

HEX#40107E
RGBrgb(64, 16, 126)
HSLhsl(266, 77%, 28%)
HSVhsv(266, 87%, 49%)
CMYKcmyk(49.2%, 87.3%, 0%, 50.6%)
CIE-LABlab(19.91, 45.01, -51.75)
CIE-LCHlch(19.91, 68.59, 311.01°)
OKLaboklab(33.05% 0.0696 -0.1485)
OKLCHoklch(33.05% 0.164 295.1)
XYZxyz(6.0645, 2.9668, 19.9877)
Luminance0.0297 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#40107E #4E7E10
analogous
#10177E #40107E #77107E
triadic
#40107E #7E4010 #107E40
tetradic
#40107E #7E1017 #4E7E10 #107E77
square
#40107E #7E1017 #4E7E10 #107E77
split-complementary
#40107E #7E7710 #177E10
monochromatic
#0E031B #240948 #40107E #5C17B4 #7825E3

Accessibility & contrast

On white

13.18
#40107E on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

1.59
#40107E on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #40107E
13.18:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##40107E#FFFFFF#000000##FFFFFF
##40107E1.0013.181.5913.18
#FFFFFF13.181.0021.001.00
#0000001.5921.001.0021.00
##FFFFFF13.181.0021.001.00

Color blindness preview

Protanopia (red-blind)
#003181
Deuteranopia (green-blind)
#002E7C
Tritanopia (blue-blind)
#2D3249
Achromatopsia (no color)
#303030

Design tokens & code

CSS
--color: #40107e;
/* rgb */ color: rgb(64, 16, 126);
/* oklch */ color: oklch(33.0% 0.164 295.1);
Tailwind
colors: {
  custom: {
    50: '#7d57a4',
    500: '#40107e',
    950: '#000000',
  },
}
SCSS
$custom: #40107e;
$custom-light: #7d57a4;
$custom-dark: #000000;
JSON
{
  "hex": "#40107e",
  "rgb": {
    "r": 64,
    "g": 16,
    "b": 126
  },
  "hsl": {
    "h": 266.182,
    "s": 77.465,
    "l": 27.843
  },
  "oklch": {
    "l": 0.33048,
    "c": 0.164,
    "h": 295.1
  },
  "luminance": 0.02967
}

Semantic roles & 50–950 ramp

primary
#40107E
secondary
#7DB436
accent
#F434A0
background
#F8F5FA
surface
#EFE9F4
border
#CAC5CE
text
#0A030F
muted
#7C787F

Preview Lab

Preview with #40107E

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

Preview Lab → · Contrast checker → · Palette generator →

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