#2A227E#2A227E

#2A227E is a dark, vivid blue. Relative luminance 0.031; OKLCH L 33.0% C 0.148 H 278.4°. Best body text is #FFFFFF at 12.89:1 contrast (WCAG AA passes).

Color values

HEX#2A227E
RGBrgb(42, 34, 126)
HSLhsl(245, 58%, 31%)
HSVhsv(245, 73%, 49%)
CMYKcmyk(66.7%, 73%, 0%, 50.6%)
CIE-LABlab(20.60, 33.14, -50.70)
CIE-LCHlch(20.60, 60.57, 303.17°)
OKLaboklab(32.97% 0.0216 -0.1463)
OKLCHoklch(32.97% 0.148 278.4)
XYZxyz(5.2916, 3.1422, 20.0623)
Luminance0.0314 (WCAG relative)
Temperaturecool
Familyblue

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#2A227E #767E22
analogous
#22487E #2A227E #58227E
triadic
#2A227E #7E2A22 #227E2A
tetradic
#2A227E #7E2248 #767E22 #227E58
square
#2A227E #7E2248 #767E22 #227E58
split-complementary
#2A227E #7E5822 #487E22
monochromatic
#0A081E #1A154E #2A227E #3A2FAE #574CCF

Accessibility & contrast

On white

12.89
#2A227E on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

1.63
#2A227E on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #2A227E
12.89:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##2A227E#FFFFFF#000000##FFFFFF
##2A227E1.0012.891.6312.89
#FFFFFF12.891.0021.001.00
#0000001.6321.001.0021.00
##FFFFFF12.891.0021.001.00

Color blindness preview

Protanopia (red-blind)
#003581
Deuteranopia (green-blind)
#002E7C
Tritanopia (blue-blind)
#003B4D
Achromatopsia (no color)
#323232

Design tokens & code

CSS
--color: #2a227e;
/* rgb */ color: rgb(42, 34, 126);
/* oklch */ color: oklch(33.0% 0.148 278.4);
Tailwind
colors: {
  custom: {
    50: '#6f5ea4',
    500: '#2a227e',
    950: '#000000',
  },
}
SCSS
$custom: #2a227e;
$custom-light: #6f5ea4;
$custom-dark: #000000;
JSON
{
  "hex": "#2a227e",
  "rgb": {
    "r": 42,
    "g": 34,
    "b": 126
  },
  "hsl": {
    "h": 245.217,
    "s": 57.5,
    "l": 31.373
  },
  "oklch": {
    "l": 0.32973,
    "c": 0.1479,
    "h": 278.4
  },
  "luminance": 0.03143
}

Semantic roles & 50–950 ramp

primary
#2A227E
secondary
#A8B14B
accent
#E147D3
background
#F7F5FA
surface
#EDE9F4
border
#C8C5CE
text
#08040F
muted
#7B797F

Preview Lab

Preview with #2A227E

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

Preview Lab → · Contrast checker → · Palette generator →

#2A227E Color — HEX, RGB, HSL, OKLCH & Contrast — Tintiva