#2B127F#2B127F

#2B127F is a dark, vivid violet. Relative luminance 0.025; OKLCH L 31.1% C 0.165 H 281.5°. Best body text is #FFFFFF at 14.04:1 contrast (WCAG AA passes).

Color values

HEX#2B127F
RGBrgb(43, 18, 127)
HSLhsl(254, 75%, 28%)
HSVhsv(254, 86%, 50%)
CMYKcmyk(66.1%, 85.8%, 0%, 50.2%)
CIE-LABlab(17.82, 42.10, -55.92)
CIE-LCHlch(17.82, 70.00, 306.97°)
OKLaboklab(31.07% 0.0328 -0.1613)
OKLCHoklch(31.07% 0.165 281.5)
XYZxyz(5.0421, 2.4781, 20.2872)
Luminance0.0248 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#2B127F #667F12
analogous
#12307F #2B127F #61127F
triadic
#2B127F #7F2B12 #127F2B
tetradic
#2B127F #7F1230 #667F12 #127F61
square
#2B127F #7F1230 #667F12 #127F61
split-complementary
#2B127F #7F6112 #307F12
monochromatic
#09041B #190A49 #2B127F #3D1AB5 #542BE1

Accessibility & contrast

On white

14.04
#2B127F on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

1.50
#2B127F on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #2B127F
14.04:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##2B127F#FFFFFF#000000##FFFFFF
##2B127F1.0014.041.5014.04
#FFFFFF14.041.0021.001.00
#0000001.5021.001.0021.00
##FFFFFF14.041.0021.001.00

Color blindness preview

Protanopia (red-blind)
#002F82
Deuteranopia (green-blind)
#00287D
Tritanopia (blue-blind)
#00354A
Achromatopsia (no color)
#2C2C2C

Design tokens & code

CSS
--color: #2b127f;
/* rgb */ color: rgb(43, 18, 127);
/* oklch */ color: oklch(31.1% 0.165 281.5);
Tailwind
colors: {
  custom: {
    50: '#7255a5',
    500: '#2b127f',
    950: '#000000',
  },
}
SCSS
$custom: #2b127f;
$custom-light: #7255a5;
$custom-dark: #000000;
JSON
{
  "hex": "#2b127f",
  "rgb": {
    "r": 43,
    "g": 18,
    "b": 127
  },
  "hsl": {
    "h": 253.761,
    "s": 75.172,
    "l": 28.431
  },
  "oklch": {
    "l": 0.31074,
    "c": 0.16466,
    "h": 281.5
  },
  "luminance": 0.02479
}

Semantic roles & 50–950 ramp

primary
#2B127F
secondary
#98B538
accent
#F236C7
background
#F7F5FA
surface
#EDE9F4
border
#C8C5CE
text
#09030F
muted
#7B787F

Preview Lab

Preview with #2B127F

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

Preview Lab → · Contrast checker → · Palette generator →

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