#2F187C#2F187C

#2F187C is a dark, vivid violet. Relative luminance 0.027; OKLCH L 31.8% C 0.155 H 283.7°. Best body text is #FFFFFF at 13.61:1 contrast (WCAG AA passes).

Color values

HEX#2F187C
RGBrgb(47, 24, 124)
HSLhsl(254, 68%, 29%)
HSVhsv(254, 81%, 49%)
CMYKcmyk(62.1%, 80.6%, 0%, 51.4%)
CIE-LABlab(18.85, 38.80, -52.29)
CIE-LCHlch(18.85, 65.11, 306.58°)
OKLaboklab(31.79% 0.0369 -0.1507)
OKLCHoklch(31.79% 0.155 283.7)
XYZxyz(5.1359, 2.7125, 19.3178)
Luminance0.0271 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#2F187C #657C18
analogous
#18337C #2F187C #61187C
triadic
#2F187C #7C2F18 #187C2F
tetradic
#2F187C #7C1833 #657C18 #187C61
square
#2F187C #7C1833 #657C18 #187C61
split-complementary
#2F187C #7C6118 #337C18
monochromatic
#0A051A #1C0E49 #2F187C #4222AF #5B36D8

Accessibility & contrast

On white

13.61
#2F187C on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

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

Best text color

#FFFFFF on #2F187C
13.61:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##2F187C#FFFFFF#000000##FFFFFF
##2F187C1.0013.611.5413.61
#FFFFFF13.611.0021.001.00
#0000001.5421.001.0021.00
##FFFFFF13.611.0021.001.00

Color blindness preview

Protanopia (red-blind)
#00317F
Deuteranopia (green-blind)
#002B7A
Tritanopia (blue-blind)
#00354A
Achromatopsia (no color)
#2E2E2E

Design tokens & code

CSS
--color: #2f187c;
/* rgb */ color: rgb(47, 24, 124);
/* oklch */ color: oklch(31.8% 0.155 283.7);
Tailwind
colors: {
  custom: {
    50: '#7258a3',
    500: '#2f187c',
    950: '#000000',
  },
}
SCSS
$custom: #2f187c;
$custom-light: #7258a3;
$custom-dark: #000000;
JSON
{
  "hex": "#2f187c",
  "rgb": {
    "r": 47,
    "g": 24,
    "b": 124
  },
  "hsl": {
    "h": 253.8,
    "s": 67.568,
    "l": 29.02
  },
  "oklch": {
    "l": 0.31787,
    "c": 0.15517,
    "h": 283.7
  },
  "luminance": 0.02713
}

Semantic roles & 50–950 ramp

primary
#2F187C
secondary
#97B13F
accent
#EA3DC3
background
#F7F5FA
surface
#EDE9F4
border
#C8C5CE
text
#09030F
muted
#7B787F

Preview Lab

Preview with #2F187C

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

Preview Lab → · Contrast checker → · Palette generator →

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