#2F186C#2F186C

#2F186C is a dark, vivid violet. Relative luminance 0.023; OKLCH L 30.1% C 0.135 H 287.9°. Best body text is #FFFFFF at 14.31:1 contrast (WCAG AA passes).

Color values

HEX#2F186C
RGBrgb(47, 24, 108)
HSLhsl(256, 64%, 26%)
HSVhsv(256, 78%, 42%)
CMYKcmyk(56.5%, 77.8%, 0%, 57.6%)
CIE-LABlab(17.18, 33.82, -44.73)
CIE-LCHlch(17.18, 56.08, 307.10°)
OKLaboklab(30.11% 0.0415 -0.1286)
OKLCHoklch(30.11% 0.135 287.9)
XYZxyz(4.2049, 2.3401, 14.4146)
Luminance0.0234 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#2F186C #556C18
analogous
#182B6C #2F186C #59186C
triadic
#2F186C #6C2F18 #186C2F
tetradic
#2F186C #6C182B #556C18 #186C59
square
#2F186C #6C182B #556C18 #186C59
split-complementary
#2F186C #6C5918 #2B6C18
monochromatic
#0B0619 #190D3A #2F186C #45239E #5B2ED0

Accessibility & contrast

On white

14.31
#2F186C on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

1.47
#2F186C on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #2F186C
14.31:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##2F186C#FFFFFF#000000##FFFFFF
##2F186C1.0014.311.4714.31
#FFFFFF14.311.0021.001.00
#0000001.4721.001.0021.00
##FFFFFF14.311.0021.001.00

Color blindness preview

Protanopia (red-blind)
#002C6E
Deuteranopia (green-blind)
#00286A
Tritanopia (blue-blind)
#162F40
Achromatopsia (no color)
#2A2A2A

Design tokens & code

CSS
--color: #2f186c;
/* rgb */ color: rgb(47, 24, 108);
/* oklch */ color: oklch(30.1% 0.135 287.9);
Tailwind
colors: {
  custom: {
    50: '#6f5797',
    500: '#2f186c',
    950: '#000000',
  },
}
SCSS
$custom: #2f186c;
$custom-light: #6f5797;
$custom-dark: #000000;
JSON
{
  "hex": "#2f186c",
  "rgb": {
    "r": 47,
    "g": 24,
    "b": 108
  },
  "hsl": {
    "h": 256.429,
    "s": 63.636,
    "l": 25.882
  },
  "oklch": {
    "l": 0.30108,
    "c": 0.13515,
    "h": 287.9
  },
  "luminance": 0.0234
}

Semantic roles & 50–950 ramp

primary
#2F186C
secondary
#86A23E
accent
#E741B9
background
#F7F5F9
surface
#EDE9F2
border
#C8C5CC
text
#08030D
muted
#7B787E

Preview Lab

Preview with #2F186C

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

Preview Lab → · Contrast checker → · Palette generator →

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