#2B178F#2B178F

#2B178F is a dark, vivid violet. Relative luminance 0.031; OKLCH L 33.5% C 0.180 H 278.0°. Best body text is #FFFFFF at 12.95:1 contrast (WCAG AA passes).

Color values

HEX#2B178F
RGBrgb(43, 23, 143)
HSLhsl(250, 72%, 33%)
HSVhsv(250, 84%, 56%)
CMYKcmyk(69.9%, 83.9%, 0%, 43.9%)
CIE-LABlab(20.48, 44.69, -61.59)
CIE-LCHlch(20.48, 76.10, 305.96°)
OKLaboklab(33.46% 0.0251 -0.1779)
OKLCHoklch(33.46% 0.18 278)
XYZxyz(6.2590, 3.1090, 26.2515)
Luminance0.0311 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#2B178F #7B8F17
analogous
#173F8F #2B178F #67178F
triadic
#2B178F #8F2B17 #178F2B
tetradic
#2B178F #8F173F #7B8F17 #178F67
square
#2B178F #8F173F #7B8F17 #178F67
split-complementary
#2B178F #8F6717 #3F8F17
monochromatic
#0B0626 #1B0F5A #2B178F #3B1FC4 #5B40E0

Accessibility & contrast

On white

12.95
#2B178F on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

1.62
#2B178F on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #2B178F
12.95:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##2B178F#FFFFFF#000000##FFFFFF
##2B178F1.0012.951.6212.95
#FFFFFF12.951.0021.001.00
#0000001.6221.001.0021.00
##FFFFFF12.951.0021.001.00

Color blindness preview

Protanopia (red-blind)
#003692
Deuteranopia (green-blind)
#002C8D
Tritanopia (blue-blind)
#003D54
Achromatopsia (no color)
#313131

Design tokens & code

CSS
--color: #2b178f;
/* rgb */ color: rgb(43, 23, 143);
/* oklch */ color: oklch(33.5% 0.180 278.0);
Tailwind
colors: {
  custom: {
    50: '#7559b1',
    500: '#2b178f',
    950: '#000000',
  },
}
SCSS
$custom: #2b178f;
$custom-light: #7559b1;
$custom-dark: #000000;
JSON
{
  "hex": "#2b178f",
  "rgb": {
    "r": 43,
    "g": 23,
    "b": 143
  },
  "hsl": {
    "h": 250,
    "s": 72.289,
    "l": 32.549
  },
  "oklch": {
    "l": 0.33456,
    "c": 0.17967,
    "h": 278
  },
  "luminance": 0.0311
}

Semantic roles & 50–950 ramp

primary
#2B178F
secondary
#ABC141
accent
#EF39D1
background
#F7F5FB
surface
#EEE9F6
border
#C9C5D0
text
#0A0411
muted
#7C7980

Preview Lab

Preview with #2B178F

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

Preview Lab → · Contrast checker → · Palette generator →

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