#2F118E#2F118E

#2F118E is a dark, vivid violet. Relative luminance 0.030; OKLCH L 33.1% C 0.182 H 280.8°. Best body text is #FFFFFF at 13.19:1 contrast (WCAG AA passes).

Color values

HEX#2F118E
RGBrgb(47, 17, 142)
HSLhsl(254, 79%, 31%)
HSVhsv(254, 88%, 56%)
CMYKcmyk(66.9%, 88%, 0%, 44.3%)
CIE-LABlab(19.87, 47.23, -61.95)
CIE-LCHlch(19.87, 77.90, 307.32°)
OKLaboklab(33.1% 0.0342 -0.1788)
OKLCHoklch(33.1% 0.182 280.8)
XYZxyz(6.2537, 2.9577, 25.8273)
Luminance0.0296 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#2F118E #708E11
analogous
#11318E #2F118E #6D118E
triadic
#2F118E #8E2F11 #118E2F
tetradic
#2F118E #8E1131 #708E11 #118E6D
square
#2F118E #8E1131 #708E11 #118E6D
split-complementary
#2F118E #8E6D11 #318E11
monochromatic
#0B0421 #1D0A57 #2F118E #4118C5 #5E33E7

Accessibility & contrast

On white

13.19
#2F118E on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

1.59
#2F118E on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #2F118E
13.19:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##2F118E#FFFFFF#000000##FFFFFF
##2F118E1.0013.191.5913.19
#FFFFFF13.191.0021.001.00
#0000001.5921.001.0021.00
##FFFFFF13.191.0021.001.00

Color blindness preview

Protanopia (red-blind)
#003491
Deuteranopia (green-blind)
#002B8C
Tritanopia (blue-blind)
#003A53
Achromatopsia (no color)
#303030

Design tokens & code

CSS
--color: #2f118e;
/* rgb */ color: rgb(47, 17, 142);
/* oklch */ color: oklch(33.1% 0.182 280.8);
Tailwind
colors: {
  custom: {
    50: '#7756b0',
    500: '#2f118e',
    950: '#000000',
  },
}
SCSS
$custom: #2f118e;
$custom-light: #7756b0;
$custom-dark: #000000;
JSON
{
  "hex": "#2f118e",
  "rgb": {
    "r": 47,
    "g": 17,
    "b": 142
  },
  "hsl": {
    "h": 254.4,
    "s": 78.616,
    "l": 31.176
  },
  "oklch": {
    "l": 0.33099,
    "c": 0.182,
    "h": 280.8
  },
  "luminance": 0.02958
}

Semantic roles & 50–950 ramp

primary
#2F118E
secondary
#A1C238
accent
#F533C6
background
#F7F5FB
surface
#EEE9F6
border
#C9C5D0
text
#0A0311
muted
#7C7880

Preview Lab

Preview with #2F118E

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

Preview Lab → · Contrast checker → · Palette generator →

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