Skip to content

#2f033c

a deep, electric violet · neutral · closest name: Midnight Blue

RGB
47, 3, 60
HSL
286°, 91%, 12%
CMYK
22, 95, 0, 77
Luminance
0.0100

At a glance

Every number on this page in one read: what #2f033c is made of, how bright it looks, and which way it leans.

Hex
#2f033c
Hue
286°
violet
Saturation
91%
electric
Lightness
12%
deep
Brightness
24%
HSV value
Perceived
13%
weighted brightness
Luminance
0.0100
WCAG relative
Temperature
Neutral
58/100 cool
Color family
Violet
Tone
Electric
Best ink
White
17.51:1
Closest name
Midnight Blue
ΔE2000 12.8
Where it sits
Hue286° of 360°
Saturation91%
Lightness12%
Temperature
Warm ← → Cool58% cool

Reads neutral. Warm and cool siblings keep the same lightness, so you can swap one in without redoing your contrast maths.

Every format

HEX#2f033c
RGBrgb(47, 3, 60)
HSLhsl(286, 91%, 12%)
CMYKcmyk(22%, 95%, 0%, 77%)
LABlab(9.0 30.9 -25.4)
LCHlch(9.0 40.0 320.6)
OKLCHoklch(0.229 0.105 316.8)
Decimal3081020
Display P3color(display-p3 0.184 0.012 0.235)

Copy-ready code

/* CSS */
color: #2f033c;
background-color: #2f033c;
/* Tailwind (arbitrary) */
class="text-[#2f033c] bg-[#2f033c]"
/* SCSS */
$brand: #2f033c;
/* SwiftUI */
Color(red: 0.184, green: 0.012, blue: 0.235)
/* Android */
Color.parseColor("#2f033c")
/* Flutter */
Color(0xFF2F033C)
/* Python / OpenCV (BGR) */
(60, 3, 47)

Best text color

Only one of black and white can be right. This is the one, with the number that proves it.

Readable at a glance#ffffff on #2f033c · 17.51:1
Use #ffffffAAA at every size.
Aa
White text · 17.51:1 · recommended
AA pass · AA large pass · AAA pass
Aa
Black text · 1.20:1
AA fail · AA large fail · AAA fail
Reading the other direction: #2f033c as text scores 17.51:1 on white and 1.20:1 on black.

Accessibility — WCAG contrast

Aa
#2f033c on white: 17.51:1
AA ✓ pass · AA-large · AAA
Aa
#2f033c on black: 1.20:1
AA ✗ fail · AA-large · AAA
true color
protanopia · #00173D
deuteranopia · #031B3B
tritanopia · #2E1020

Color scale — 50 to 950

A Tailwind-shaped ramp built around this exact hex. #2f033c is pinned to step 950; the rest hold its hue and let saturation ease off at the extremes so the pale end never turns neon.

#FAF2FD
#F6E5FB
#ECC3F9
#E294FA
#D45FF7
#C629F4
#B70CE9
#980AC2
#7A089B
#590A70
#2f033c
Base = 950Lightest = 50 · #FAF2FDDarkest = 950 · #2f033c
:root {
  --brand-50: #FAF2FD;
  --brand-100: #F6E5FB;
  --brand-200: #ECC3F9;
  --brand-300: #E294FA;
  --brand-400: #D45FF7;
  --brand-500: #C629F4;
  --brand-600: #B70CE9;
  --brand-700: #980AC2;
  --brand-800: #7A089B;
  --brand-900: #590A70;
  --brand-950: #2f033c;
  --brand: #2f033c;
  --brand-ink: #ffffff;
}

Colors that work with #2f033c

Not a palette — a role sheet. Each swatch answers one question you will hit while building the component.

Text on it#ffffff
White wins here
Surface#F9F4FA
Tinted page background
Border#E2C0ED
Hairlines and dividers
Muted text#894B9B
Captions on the surface
Accent#1E3E02
Second voice, not a rival
Dark variant#5F0679
Hover, pressed, headers
Light variant#F9E7FE
Selected rows, tints
Dark surface#211424
Dark-mode background
Light mode
Everything in its place

Surface, border, heading and body all derive from this one hue, so the screen stays coherent without a second palette.

Primary actionSecondaryBadge
Dark mode
Same hue, inverted

Lightness flips, hue holds. The accent stays the anchor in both themes.

Primary actionSecondaryAccent

How to use #2f033c

Derived from its contrast, chroma and lightness — not from taste.

Works well for
  • Body text and links on white
  • Primary buttons and calls to action
  • Focus rings, active and selected states
  • Headers, footers and dark-mode surfaces
  • Brand accents, badges and data highlights
Use with care
  • Text on black or near-black surfaces
  • Full-page backgrounds — tiring over long sessions
  • Black text placed on it
  • Pairing with a same-lightness hue — edges vibrate

Similar colors

One move away from this hex in each direction. Every swatch is its own page.

Color relationships

The wheel positions with their names attached, so you can grab the one you actually need.

Complementary#103C03
Analogous left#13033C
Analogous right#3C032D
Split-complement 1#2D3C03
Split-complement 2#033C13
Triadic 1#3C2F03
Triadic 2#033C2F
Tetradic#3C1303

RGB percentages

Red18.4%
Green1.2%
Blue23.5%

CMYK percentages

Cyan21.7%
Magenta95.0%
Yellow0.0%
Key (black)76.5%

Color previews

#2f033c text on a black background

contrast 1.20:1

Card sample

#2f033c text on a white background

contrast 17.51:1

Card sample

CSS3 live lab

Text font color

The quick brown fox

color: #2f033c;
Background color
Panel with #2f033c background
background-color: #2f033c;
Text shadow — hex

Glowing headline

text-shadow: 2px 2px 8px #2f033c;
Text shadow — RGB

Soft neon halo

text-shadow: 0 0 14px rgba(47, 3, 60, 0.45);
Div box shadow
Elevated card
box-shadow: 0 12px 32px -8px rgba(47, 3, 60, 0.45);
Border & gradient
Gradient panel
border: 3px solid #2f033c;
background: linear-gradient(135deg, #2f033c, #3C0323);

Monochromatic scale

Palettes built from #2f033c

Shades — darker

Tints — lighter

Color harmonies

Nearest named colors

Ranked with CIEDE2000 across all 139 CSS keywords. Under ΔE 2 the eye stops telling them apart; over ΔE 10 they are plainly different colors.

#2f033c in the real world

Where a color in this family tends to land, and the interface roles it is usually asked to play.

Industries
Creative toolsFintechBeautyLuxury
Common UI roles
ButtonsLinksFocus statesCharts
Print note

Sits outside most CMYK gamuts — expect a duller press result, or specify a spot ink.

#2f033c, answered

What color is #2f033c?

#2f033c is a deep electric violet, closest to Midnight Blue (ΔE2000 12.8). It sits at 286° on the hue wheel with 91% saturation and 12% lightness, which reads as neutral.

What is the RGB value of #2f033c?

rgb(47, 3, 60) — 47 red, 3 green and 60 blue out of 255, or 18.4% / 1.2% / 23.5% by channel.

Is #2f033c a light or a dark color?

It is a dark color. Relative luminance is 0.0100 and perceived brightness is 13%, so white text on it reaches 17.51:1.

Should I use black or white text on #2f033c?

White. It scores 17.51:1 against #2f033c, versus 1.20:1 for black — AAA at any size.

What is the complementary color of #2f033c?

#103C03 sits directly opposite on the wheel. Softer options are the split-complements #2D3C03 and #033C13, which give the same contrast with far less vibration.

What colors go well with #2f033c?

For interface work: #F9F4FA as the surface, #E2C0ED for borders, #894B9B for secondary text, #1E3E02 as an accent and #5F0679 for hover and pressed states. For a palette, the analogous pair #13033C and #3C032D stays calm, while #103C03 is the loudest partner.

What is #2f033c in CMYK for printing?

cmyk(22%, 95%, 0%, 77%). This is a screen-to-ink approximation — a color this saturated sits outside most CMYK gamuts and will print duller than it looks here.

Is #2f033c warm or cool?

Neutral — it scores 58 on a scale where 0 is the warmest orange and 100 the coolest azure. Nudged warmer it becomes #3C0334; nudged cooler, #1A023D.

Work with #2f033c in the Color Lab