#311A7E#311A7E

#311A7E is a dark, vivid violet. Relative luminance 0.029; OKLCH L 32.4% C 0.155 H 284.2°. Best body text is #FFFFFF at 13.29:1 contrast (WCAG AA passes).

Color values

HEX#311A7E
RGBrgb(49, 26, 126)
HSLhsl(254, 66%, 30%)
HSVhsv(254, 79%, 49%)
CMYKcmyk(61.1%, 79.4%, 0%, 50.6%)
CIE-LABlab(19.63, 38.65, -52.28)
CIE-LCHlch(19.63, 65.01, 306.48°)
OKLaboklab(32.44% 0.0381 -0.1506)
OKLCHoklch(32.44% 0.155 284.2)
XYZxyz(5.4008, 2.8978, 20.0094)
Luminance0.0290 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#311A7E #677E1A
analogous
#1A357E #311A7E #631A7E
triadic
#311A7E #7E311A #1A7E31
tetradic
#311A7E #7E1A35 #677E1A #1A7E63
square
#311A7E #7E1A35 #677E1A #1A7E63
split-complementary
#311A7E #7E631A #357E1A
monochromatic
#0A0519 #1D104B #311A7E #4524B1 #5F3CD7

Accessibility & contrast

On white

13.29
#311A7E on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

1.58
#311A7E on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #311A7E
13.29:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##311A7E#FFFFFF#000000##FFFFFF
##311A7E1.0013.291.5813.29
#FFFFFF13.291.0021.001.00
#0000001.5821.001.0021.00
##FFFFFF13.291.0021.001.00

Color blindness preview

Protanopia (red-blind)
#003281
Deuteranopia (green-blind)
#002C7C
Tritanopia (blue-blind)
#02374B
Achromatopsia (no color)
#2F2F2F

Design tokens & code

CSS
--color: #311a7e;
/* rgb */ color: rgb(49, 26, 126);
/* oklch */ color: oklch(32.4% 0.155 284.2);
Tailwind
colors: {
  custom: {
    50: '#745aa4',
    500: '#311a7e',
    950: '#000000',
  },
}
SCSS
$custom: #311a7e;
$custom-light: #745aa4;
$custom-dark: #000000;
JSON
{
  "hex": "#311a7e",
  "rgb": {
    "r": 49,
    "g": 26,
    "b": 126
  },
  "hsl": {
    "h": 253.8,
    "s": 65.789,
    "l": 29.804
  },
  "oklch": {
    "l": 0.32443,
    "c": 0.15538,
    "h": 284.2
  },
  "luminance": 0.02898
}

Semantic roles & 50–950 ramp

primary
#311A7E
secondary
#98B242
accent
#E93FC2
background
#F7F5FA
surface
#EDE9F4
border
#C8C5CE
text
#09040F
muted
#7B797F

Preview Lab

Preview with #311A7E

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

Preview Lab → · Contrast checker → · Palette generator →

#311A7E Color — HEX, RGB, HSL, OKLCH & Contrast — Tintiva