#2F187E#2F187E

#2F187E is a dark, vivid violet. Relative luminance 0.028; OKLCH L 32.0% C 0.158 H 283.3°. Best body text is #FFFFFF at 13.52:1 contrast (WCAG AA passes).

Color values

HEX#2F187E
RGBrgb(47, 24, 126)
HSLhsl(254, 68%, 29%)
HSVhsv(254, 81%, 49%)
CMYKcmyk(62.7%, 81%, 0%, 50.6%)
CIE-LABlab(19.07, 39.42, -53.20)
CIE-LCHlch(19.07, 66.21, 306.53°)
OKLaboklab(32% 0.0362 -0.1534)
OKLCHoklch(32% 0.158 283.3)
XYZxyz(5.2637, 2.7636, 19.9907)
Luminance0.0276 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#2F187E #677E18
analogous
#18347E #2F187E #62187E
triadic
#2F187E #7E2F18 #187E2F
tetradic
#2F187E #7E1834 #677E18 #187E62
square
#2F187E #7E1834 #677E18 #187E62
split-complementary
#2F187E #7E6218 #347E18
monochromatic
#0A051A #1C0E4B #2F187E #4222B1 #5C37D9

Accessibility & contrast

On white

13.52
#2F187E on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

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

Best text color

#FFFFFF on #2F187E
13.52:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##2F187E#FFFFFF#000000##FFFFFF
##2F187E1.0013.521.5513.52
#FFFFFF13.521.0021.001.00
#0000001.5521.001.0021.00
##FFFFFF13.521.0021.001.00

Color blindness preview

Protanopia (red-blind)
#003181
Deuteranopia (green-blind)
#002B7C
Tritanopia (blue-blind)
#00364B
Achromatopsia (no color)
#2E2E2E

Design tokens & code

CSS
--color: #2f187e;
/* rgb */ color: rgb(47, 24, 126);
/* oklch */ color: oklch(32.0% 0.158 283.3);
Tailwind
colors: {
  custom: {
    50: '#7359a4',
    500: '#2f187e',
    950: '#000000',
  },
}
SCSS
$custom: #2f187e;
$custom-light: #7359a4;
$custom-dark: #000000;
JSON
{
  "hex": "#2f187e",
  "rgb": {
    "r": 47,
    "g": 24,
    "b": 126
  },
  "hsl": {
    "h": 253.529,
    "s": 68,
    "l": 29.412
  },
  "oklch": {
    "l": 0.32004,
    "c": 0.15762,
    "h": 283.3
  },
  "luminance": 0.02764
}

Semantic roles & 50–950 ramp

primary
#2F187E
secondary
#98B23F
accent
#EB3DC4
background
#F7F5FA
surface
#EDE9F4
border
#C8C5CE
text
#09040F
muted
#7B797F

Preview Lab

Preview with #2F187E

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

Preview Lab → · Contrast checker → · Palette generator →

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