#2A127B#2A127B

#2A127B is a dark, vivid violet. Relative luminance 0.024; OKLCH L 30.5% C 0.160 H 281.8°. Best body text is #FFFFFF at 14.28:1 contrast (WCAG AA passes).

Color values

HEX#2A127B
RGBrgb(42, 18, 123)
HSLhsl(254, 74%, 28%)
HSVhsv(254, 85%, 48%)
CMYKcmyk(65.9%, 85.4%, 0%, 51.8%)
CIE-LABlab(17.25, 40.80, -54.32)
CIE-LCHlch(17.25, 67.94, 306.91°)
OKLaboklab(30.52% 0.0327 -0.1567)
OKLCHoklch(30.52% 0.16 281.8)
XYZxyz(4.7452, 2.3546, 18.9395)
Luminance0.0236 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#2A127B #637B12
analogous
#122F7B #2A127B #5E127B
triadic
#2A127B #7B2A12 #127B2A
tetradic
#2A127B #7B122F #637B12 #127B5E
square
#2A127B #7B122F #637B12 #127B5E
split-complementary
#2A127B #7B5E12 #2F7B12
monochromatic
#09041B #180A46 #2A127B #3C1AB0 #5228E0

Accessibility & contrast

On white

14.28
#2A127B on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

1.47
#2A127B on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #2A127B
14.28:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##2A127B#FFFFFF#000000##FFFFFF
##2A127B1.0014.281.4714.28
#FFFFFF14.281.0021.001.00
#0000001.4721.001.0021.00
##FFFFFF14.281.0021.001.00

Color blindness preview

Protanopia (red-blind)
#002E7E
Deuteranopia (green-blind)
#002779
Tritanopia (blue-blind)
#003348
Achromatopsia (no color)
#2A2A2A

Design tokens & code

CSS
--color: #2a127b;
/* rgb */ color: rgb(42, 18, 123);
/* oklch */ color: oklch(30.5% 0.160 281.8);
Tailwind
colors: {
  custom: {
    50: '#7055a2',
    500: '#2a127b',
    950: '#000000',
  },
}
SCSS
$custom: #2a127b;
$custom-light: #7055a2;
$custom-dark: #000000;
JSON
{
  "hex": "#2a127b",
  "rgb": {
    "r": 42,
    "g": 18,
    "b": 123
  },
  "hsl": {
    "h": 253.714,
    "s": 74.468,
    "l": 27.647
  },
  "oklch": {
    "l": 0.30518,
    "c": 0.16008,
    "h": 281.8
  },
  "luminance": 0.02355
}

Semantic roles & 50–950 ramp

primary
#2A127B
secondary
#95B138
accent
#F137C6
background
#F7F5FA
surface
#EDE9F4
border
#C8C5CE
text
#09030F
muted
#7B787F

Preview Lab

Preview with #2A127B

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

Preview Lab → · Contrast checker → · Palette generator →

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