#2F187A#2F187A

#2F187A is a dark, vivid violet. Relative luminance 0.027; OKLCH L 31.6% C 0.153 H 284.2°. Best body text is #FFFFFF at 13.70:1 contrast (WCAG AA passes).

Color values

HEX#2F187A
RGBrgb(47, 24, 122)
HSLhsl(254, 67%, 29%)
HSVhsv(254, 80%, 48%)
CMYKcmyk(61.5%, 80.3%, 0%, 52.2%)
CIE-LABlab(18.64, 38.18, -51.37)
CIE-LCHlch(18.64, 64.00, 306.62°)
OKLaboklab(31.57% 0.0375 -0.148)
OKLCHoklch(31.57% 0.153 284.2)
XYZxyz(5.0107, 2.6624, 18.6584)
Luminance0.0266 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#2F187A #637A18
analogous
#18327A #2F187A #60187A
triadic
#2F187A #7A2F18 #187A2F
tetradic
#2F187A #7A1832 #637A18 #187A60
square
#2F187A #7A1832 #637A18 #187A60
split-complementary
#2F187A #7A6018 #327A18
monochromatic
#0A051A #1B0E47 #2F187A #4322AD #5B35D7

Accessibility & contrast

On white

13.70
#2F187A on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

1.53
#2F187A on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #2F187A
13.70:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##2F187A#FFFFFF#000000##FFFFFF
##2F187A1.0013.701.5313.70
#FFFFFF13.701.0021.001.00
#0000001.5321.001.0021.00
##FFFFFF13.701.0021.001.00

Color blindness preview

Protanopia (red-blind)
#00307D
Deuteranopia (green-blind)
#002A78
Tritanopia (blue-blind)
#013548
Achromatopsia (no color)
#2D2D2D

Design tokens & code

CSS
--color: #2f187a;
/* rgb */ color: rgb(47, 24, 122);
/* oklch */ color: oklch(31.6% 0.153 284.2);
Tailwind
colors: {
  custom: {
    50: '#7258a1',
    500: '#2f187a',
    950: '#000000',
  },
}
SCSS
$custom: #2f187a;
$custom-light: #7258a1;
$custom-dark: #000000;
JSON
{
  "hex": "#2f187a",
  "rgb": {
    "r": 47,
    "g": 24,
    "b": 122
  },
  "hsl": {
    "h": 254.082,
    "s": 67.123,
    "l": 28.627
  },
  "oklch": {
    "l": 0.31572,
    "c": 0.15271,
    "h": 284.2
  },
  "luminance": 0.02663
}

Semantic roles & 50–950 ramp

primary
#2F187A
secondary
#95AF3F
accent
#EA3EC2
background
#F7F5FA
surface
#EDE9F4
border
#C8C5CE
text
#09030F
muted
#7B787F

Preview Lab

Preview with #2F187A

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

Preview Lab → · Contrast checker → · Palette generator →

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