#2A1F8B#2A1F8B

#2A1F8B is a dark, vivid blue. Relative luminance 0.033; OKLCH L 33.9% C 0.168 H 277.1°. Best body text is #FFFFFF at 12.60:1 contrast (WCAG AA passes).

Color values

HEX#2A1F8B
RGBrgb(42, 31, 139)
HSLhsl(246, 64%, 33%)
HSVhsv(246, 78%, 55%)
CMYKcmyk(69.8%, 77.7%, 0%, 45.5%)
CIE-LABlab(21.34, 39.27, -57.67)
CIE-LCHlch(21.34, 69.77, 304.25°)
OKLaboklab(33.91% 0.0208 -0.1666)
OKLCHoklch(33.91% 0.168 277.1)
XYZxyz(6.1035, 3.3358, 24.7433)
Luminance0.0334 (WCAG relative)
Temperaturecool
Familyblue

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#2A1F8B #808B1F
analogous
#1F4A8B #2A1F8B #601F8B
triadic
#2A1F8B #8B2A1F #1F8B2A
tetradic
#2A1F8B #8B1F4A #808B1F #1F8B60
square
#2A1F8B #8B1F4A #808B1F #1F8B60
split-complementary
#2A1F8B #8B601F #4A8B1F
monochromatic
#0C0927 #1B1459 #2A1F8B #392ABD #5B4DD7

Accessibility & contrast

On white

12.60
#2A1F8B on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

1.67
#2A1F8B on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #2A1F8B
12.60:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##2A1F8B#FFFFFF#000000##FFFFFF
##2A1F8B1.0012.601.6712.60
#FFFFFF12.601.0021.001.00
#0000001.6721.001.0021.00
##FFFFFF12.601.0021.001.00

Color blindness preview

Protanopia (red-blind)
#00388E
Deuteranopia (green-blind)
#002F89
Tritanopia (blue-blind)
#003F54
Achromatopsia (no color)
#333333

Design tokens & code

CSS
--color: #2a1f8b;
/* rgb */ color: rgb(42, 31, 139);
/* oklch */ color: oklch(33.9% 0.168 277.1);
Tailwind
colors: {
  custom: {
    50: '#735dae',
    500: '#2a1f8b',
    950: '#000000',
  },
}
SCSS
$custom: #2a1f8b;
$custom-light: #735dae;
$custom-dark: #000000;
JSON
{
  "hex": "#2a1f8b",
  "rgb": {
    "r": 42,
    "g": 31,
    "b": 139
  },
  "hsl": {
    "h": 246.111,
    "s": 63.529,
    "l": 33.333
  },
  "oklch": {
    "l": 0.33905,
    "c": 0.16792,
    "h": 277.1
  },
  "luminance": 0.03336
}

Semantic roles & 50–950 ramp

primary
#2A1F8B
secondary
#AFBA4C
accent
#E741D6
background
#F7F5FA
surface
#EDE9F4
border
#C8C5CE
text
#090410
muted
#7B797F

Preview Lab

Preview with #2A1F8B

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

Preview Lab → · Contrast checker → · Palette generator →

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