#40268B#40268B

#40268B is a dark, vivid violet. Relative luminance 0.043; OKLCH L 36.8% C 0.157 H 287.9°. Best body text is #FFFFFF at 11.24:1 contrast (WCAG AA passes).

Color values

HEX#40268B
RGBrgb(64, 38, 139)
HSLhsl(255, 57%, 35%)
HSVhsv(255, 73%, 55%)
CMYKcmyk(54%, 72.7%, 0%, 45.5%)
CIE-LABlab(24.76, 38.43, -51.96)
CIE-LCHlch(24.76, 64.63, 306.48°)
OKLaboklab(36.83% 0.0482 -0.1493)
OKLCHoklch(36.83% 0.157 287.9)
XYZxyz(7.4663, 4.3399, 24.8654)
Luminance0.0434 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#40268B #718B26
analogous
#263E8B #40268B #73268B
triadic
#40268B #8B4026 #268B40
tetradic
#40268B #8B263E #718B26 #268B73
square
#40268B #8B263E #718B26 #268B73
split-complementary
#40268B #8B7326 #3E8B26
monochromatic
#140C2B #2A195B #40268B #5633BB #795AD2

Accessibility & contrast

On white

11.24
#40268B on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

1.87
#40268B on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #40268B
11.24:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##40268B#FFFFFF#000000##FFFFFF
##40268B1.0011.241.8711.24
#FFFFFF11.241.0021.001.00
#0000001.8721.001.0021.00
##FFFFFF11.241.0021.001.00

Color blindness preview

Protanopia (red-blind)
#003D8E
Deuteranopia (green-blind)
#003889
Tritanopia (blue-blind)
#234156
Achromatopsia (no color)
#3B3B3B

Design tokens & code

CSS
--color: #40268b;
/* rgb */ color: rgb(64, 38, 139);
/* oklch */ color: oklch(36.8% 0.157 287.9);
Tailwind
colors: {
  custom: {
    50: '#7d63ae',
    500: '#40268b',
    950: '#000000',
  },
}
SCSS
$custom: #40268b;
$custom-light: #7d63ae;
$custom-dark: #000000;
JSON
{
  "hex": "#40268b",
  "rgb": {
    "r": 64,
    "g": 38,
    "b": 139
  },
  "hsl": {
    "h": 255.446,
    "s": 57.062,
    "l": 34.706
  },
  "oklch": {
    "l": 0.3683,
    "c": 0.15691,
    "h": 287.9
  },
  "luminance": 0.0434
}

Semantic roles & 50–950 ramp

primary
#40268B
secondary
#9EB756
accent
#E047B9
background
#F8F6FA
surface
#EFEBF4
border
#CAC6CE
text
#0A0510
muted
#7C7A7F

Preview Lab

Preview with #40268B

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

Preview Lab → · Contrast checker → · Palette generator →

#40268B Color — HEX, RGB, HSL, OKLCH & Contrast — Tintiva