#2B127E#2B127E

#2B127E is a dark, vivid violet. Relative luminance 0.025; OKLCH L 31.0% C 0.163 H 281.7°. Best body text is #FFFFFF at 14.09:1 contrast (WCAG AA passes).

Color values

HEX#2B127E
RGBrgb(43, 18, 126)
HSLhsl(254, 75%, 28%)
HSVhsv(254, 86%, 49%)
CMYKcmyk(65.9%, 85.7%, 0%, 50.6%)
CIE-LABlab(17.70, 41.80, -55.48)
CIE-LCHlch(17.70, 69.47, 306.99°)
OKLaboklab(30.96% 0.0332 -0.1601)
OKLCHoklch(30.96% 0.163 281.7)
XYZxyz(4.9773, 2.4522, 19.9457)
Luminance0.0245 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#2B127E #657E12
analogous
#122F7E #2B127E #61127E
triadic
#2B127E #7E2B12 #127E2B
tetradic
#2B127E #7E122F #657E12 #127E61
square
#2B127E #7E122F #657E12 #127E61
split-complementary
#2B127E #7E6112 #2F7E12
monochromatic
#09041B #190A48 #2B127E #3D1AB4 #542AE1

Accessibility & contrast

On white

14.09
#2B127E on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

1.49
#2B127E on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #2B127E
14.09:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##2B127E#FFFFFF#000000##FFFFFF
##2B127E1.0014.091.4914.09
#FFFFFF14.091.0021.001.00
#0000001.4921.001.0021.00
##FFFFFF14.091.0021.001.00

Color blindness preview

Protanopia (red-blind)
#002F81
Deuteranopia (green-blind)
#00277C
Tritanopia (blue-blind)
#00344A
Achromatopsia (no color)
#2B2B2B

Design tokens & code

CSS
--color: #2b127e;
/* rgb */ color: rgb(43, 18, 126);
/* oklch */ color: oklch(31.0% 0.163 281.7);
Tailwind
colors: {
  custom: {
    50: '#7155a5',
    500: '#2b127e',
    950: '#000000',
  },
}
SCSS
$custom: #2b127e;
$custom-light: #7155a5;
$custom-dark: #000000;
JSON
{
  "hex": "#2b127e",
  "rgb": {
    "r": 43,
    "g": 18,
    "b": 126
  },
  "hsl": {
    "h": 253.889,
    "s": 75,
    "l": 28.235
  },
  "oklch": {
    "l": 0.30958,
    "c": 0.16348,
    "h": 281.7
  },
  "luminance": 0.02453
}

Semantic roles & 50–950 ramp

primary
#2B127E
secondary
#97B438
accent
#F236C6
background
#F7F5FA
surface
#EDE9F4
border
#C8C5CE
text
#09030F
muted
#7B787F

Preview Lab

Preview with #2B127E

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

Preview Lab → · Contrast checker → · Palette generator →

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