#40307E#40307E

#40307E is a dark, vivid violet. Relative luminance 0.047; OKLCH L 37.3% C 0.126 H 288.1°. Best body text is #FFFFFF at 10.81:1 contrast (WCAG AA passes).

Color values

HEX#40307E
RGBrgb(64, 48, 126)
HSLhsl(252, 45%, 34%)
HSVhsv(252, 62%, 49%)
CMYKcmyk(49.2%, 61.9%, 0%, 50.6%)
CIE-LABlab(25.89, 28.37, -41.99)
CIE-LCHlch(25.89, 50.68, 304.05°)
OKLaboklab(37.3% 0.0393 -0.12)
OKLCHoklch(37.3% 0.126 288.1)
XYZxyz(6.9361, 4.7100, 20.2783)
Luminance0.0471 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#40307E #6E7E30
analogous
#30477E #40307E #67307E
triadic
#40307E #7E4030 #307E40
tetradic
#40307E #7E3047 #6E7E30 #307E67
square
#40307E #7E3047 #6E7E30 #307E67
split-complementary
#40307E #7E6730 #477E30
monochromatic
#130E25 #291F52 #40307E #5741AA #7864C4

Accessibility & contrast

On white

10.81
#40307E on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

1.94
#40307E on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #40307E
10.81:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##40307E#FFFFFF#000000##FFFFFF
##40307E1.0010.811.9410.81
#FFFFFF10.811.0021.001.00
#0000001.9421.001.0021.00
##FFFFFF10.811.0021.001.00

Color blindness preview

Protanopia (red-blind)
#003F81
Deuteranopia (green-blind)
#003B7C
Tritanopia (blue-blind)
#2C4252
Achromatopsia (no color)
#3D3D3D

Design tokens & code

CSS
--color: #40307e;
/* rgb */ color: rgb(64, 48, 126);
/* oklch */ color: oklch(37.3% 0.126 288.1);
Tailwind
colors: {
  custom: {
    50: '#7a69a4',
    500: '#40307e',
    950: '#000000',
  },
}
SCSS
$custom: #40307e;
$custom-light: #7a69a4;
$custom-dark: #000000;
JSON
{
  "hex": "#40307e",
  "rgb": {
    "r": 64,
    "g": 48,
    "b": 126
  },
  "hsl": {
    "h": 252.308,
    "s": 44.828,
    "l": 34.118
  },
  "oklch": {
    "l": 0.37304,
    "c": 0.12627,
    "h": 288.1
  },
  "luminance": 0.0471
}

Semantic roles & 50–950 ramp

primary
#40307E
secondary
#9BAB5F
accent
#D553BA
background
#F7F6FA
surface
#EEEBF4
border
#C9C6CE
text
#0A060F
muted
#7C7A7F

Preview Lab

Preview with #40307E

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

Preview Lab → · Contrast checker → · Palette generator →

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