#2F187B#2F187B

#2F187B is a dark, vivid violet. Relative luminance 0.027; OKLCH L 31.7% C 0.154 H 284.0°. Best body text is #FFFFFF at 13.66:1 contrast (WCAG AA passes).

Color values

HEX#2F187B
RGBrgb(47, 24, 123)
HSLhsl(254, 67%, 29%)
HSVhsv(254, 80%, 48%)
CMYKcmyk(61.8%, 80.5%, 0%, 51.8%)
CIE-LABlab(18.75, 38.49, -51.83)
CIE-LCHlch(18.75, 64.56, 306.60°)
OKLaboklab(31.68% 0.0372 -0.1494)
OKLCHoklch(31.68% 0.154 284)
XYZxyz(5.0730, 2.6873, 18.9864)
Luminance0.0269 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#2F187B #647B18
analogous
#18337B #2F187B #61187B
triadic
#2F187B #7B2F18 #187B2F
tetradic
#2F187B #7B1833 #647B18 #187B61
square
#2F187B #7B1833 #647B18 #187B61
split-complementary
#2F187B #7B6118 #337B18
monochromatic
#0A051A #1B0E48 #2F187B #4322AE #5B36D8

Accessibility & contrast

On white

13.66
#2F187B on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

1.54
#2F187B on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #2F187B
13.66:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##2F187B#FFFFFF#000000##FFFFFF
##2F187B1.0013.661.5413.66
#FFFFFF13.661.0021.001.00
#0000001.5421.001.0021.00
##FFFFFF13.661.0021.001.00

Color blindness preview

Protanopia (red-blind)
#00307E
Deuteranopia (green-blind)
#002A79
Tritanopia (blue-blind)
#003549
Achromatopsia (no color)
#2E2E2E

Design tokens & code

CSS
--color: #2f187b;
/* rgb */ color: rgb(47, 24, 123);
/* oklch */ color: oklch(31.7% 0.154 284.0);
Tailwind
colors: {
  custom: {
    50: '#7258a2',
    500: '#2f187b',
    950: '#000000',
  },
}
SCSS
$custom: #2f187b;
$custom-light: #7258a2;
$custom-dark: #000000;
JSON
{
  "hex": "#2f187b",
  "rgb": {
    "r": 47,
    "g": 24,
    "b": 123
  },
  "hsl": {
    "h": 253.939,
    "s": 67.347,
    "l": 28.824
  },
  "oklch": {
    "l": 0.31679,
    "c": 0.15394,
    "h": 284
  },
  "luminance": 0.02688
}

Semantic roles & 50–950 ramp

primary
#2F187B
secondary
#96B03F
accent
#EA3EC2
background
#F7F5FA
surface
#EDE9F4
border
#C8C5CE
text
#09030F
muted
#7B787F

Preview Lab

Preview with #2F187B

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

Preview Lab → · Contrast checker → · Palette generator →

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