#2B157F#2B157F

#2B157F is a dark, vivid violet. Relative luminance 0.026; OKLCH L 31.4% C 0.162 H 281.1°. Best body text is #FFFFFF at 13.85:1 contrast (WCAG AA passes).

Color values

HEX#2B157F
RGBrgb(43, 21, 127)
HSLhsl(252, 72%, 29%)
HSVhsv(252, 83%, 50%)
CMYKcmyk(66.1%, 83.5%, 0%, 50.2%)
CIE-LABlab(18.28, 40.74, -55.15)
CIE-LCHlch(18.28, 68.56, 306.45°)
OKLaboklab(31.4% 0.0313 -0.1592)
OKLCHoklch(31.4% 0.162 281.1)
XYZxyz(5.0940, 2.5818, 20.3045)
Luminance0.0258 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#2B157F #697F15
analogous
#15347F #2B157F #60157F
triadic
#2B157F #7F2B15 #157F2B
tetradic
#2B157F #7F1534 #697F15 #157F60
square
#2B157F #7F1534 #697F15 #157F60
split-complementary
#2B157F #7F6015 #347F15
monochromatic
#09041A #190C4A #2B157F #3D1EB4 #5531DD

Accessibility & contrast

On white

13.85
#2B157F on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

1.52
#2B157F on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #2B157F
13.85:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##2B157F#FFFFFF#000000##FFFFFF
##2B157F1.0013.851.5213.85
#FFFFFF13.851.0021.001.00
#0000001.5221.001.0021.00
##FFFFFF13.851.0021.001.00

Color blindness preview

Protanopia (red-blind)
#003082
Deuteranopia (green-blind)
#00297D
Tritanopia (blue-blind)
#00364B
Achromatopsia (no color)
#2D2D2D

Design tokens & code

CSS
--color: #2b157f;
/* rgb */ color: rgb(43, 21, 127);
/* oklch */ color: oklch(31.4% 0.162 281.1);
Tailwind
colors: {
  custom: {
    50: '#7157a5',
    500: '#2b157f',
    950: '#000000',
  },
}
SCSS
$custom: #2b157f;
$custom-light: #7157a5;
$custom-dark: #000000;
JSON
{
  "hex": "#2b157f",
  "rgb": {
    "r": 43,
    "g": 21,
    "b": 127
  },
  "hsl": {
    "h": 252.453,
    "s": 71.622,
    "l": 29.02
  },
  "oklch": {
    "l": 0.31395,
    "c": 0.16221,
    "h": 281.1
  },
  "luminance": 0.02582
}

Semantic roles & 50–950 ramp

primary
#2B157F
secondary
#9BB43C
accent
#EE39C9
background
#F7F5FA
surface
#EDE9F4
border
#C8C5CE
text
#09030F
muted
#7B787F

Preview Lab

Preview with #2B157F

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

Preview Lab → · Contrast checker → · Palette generator →

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