#2F187D#2F187D

#2F187D is a dark, vivid violet. Relative luminance 0.027; OKLCH L 31.9% C 0.156 H 283.5°. Best body text is #FFFFFF at 13.57:1 contrast (WCAG AA passes).

Color values

HEX#2F187D
RGBrgb(47, 24, 125)
HSLhsl(254, 68%, 29%)
HSVhsv(254, 81%, 49%)
CMYKcmyk(62.4%, 80.8%, 0%, 51%)
CIE-LABlab(18.96, 39.11, -52.75)
CIE-LCHlch(18.96, 65.66, 306.55°)
OKLaboklab(31.9% 0.0365 -0.1521)
OKLCHoklch(31.9% 0.156 283.5)
XYZxyz(5.1995, 2.7379, 19.6525)
Luminance0.0274 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#2F187D #667D18
analogous
#18347D #2F187D #62187D
triadic
#2F187D #7D2F18 #187D2F
tetradic
#2F187D #7D1834 #667D18 #187D62
square
#2F187D #7D1834 #667D18 #187D62
split-complementary
#2F187D #7D6218 #347D18
monochromatic
#0A051A #1C0E4A #2F187D #4222B0 #5C37D9

Accessibility & contrast

On white

13.57
#2F187D on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

1.55
#2F187D on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #2F187D
13.57:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##2F187D#FFFFFF#000000##FFFFFF
##2F187D1.0013.571.5513.57
#FFFFFF13.571.0021.001.00
#0000001.5521.001.0021.00
##FFFFFF13.571.0021.001.00

Color blindness preview

Protanopia (red-blind)
#003180
Deuteranopia (green-blind)
#002B7B
Tritanopia (blue-blind)
#00364A
Achromatopsia (no color)
#2E2E2E

Design tokens & code

CSS
--color: #2f187d;
/* rgb */ color: rgb(47, 24, 125);
/* oklch */ color: oklch(31.9% 0.156 283.5);
Tailwind
colors: {
  custom: {
    50: '#7358a4',
    500: '#2f187d',
    950: '#000000',
  },
}
SCSS
$custom: #2f187d;
$custom-light: #7358a4;
$custom-dark: #000000;
JSON
{
  "hex": "#2f187d",
  "rgb": {
    "r": 47,
    "g": 24,
    "b": 125
  },
  "hsl": {
    "h": 253.663,
    "s": 67.785,
    "l": 29.216
  },
  "oklch": {
    "l": 0.31895,
    "c": 0.1564,
    "h": 283.5
  },
  "luminance": 0.02738
}

Semantic roles & 50–950 ramp

primary
#2F187D
secondary
#98B23F
accent
#EB3DC3
background
#F7F5FA
surface
#EDE9F4
border
#C8C5CE
text
#09030F
muted
#7B787F

Preview Lab

Preview with #2F187D

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

Preview Lab → · Contrast checker → · Palette generator →

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