Skip to content

#2f0d4f

a deep, vivid violet · cool · closest name: Midnight Blue

RGB
47, 13, 79
HSL
271°, 72%, 18%
CMYK
41, 84, 0, 69
Luminance
0.0146

At a glance

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

Hex
#2f0d4f
Hue
271°
violet
Saturation
72%
vivid
Lightness
18%
deep
Brightness
31%
HSV value
Perceived
15%
weighted brightness
Luminance
0.0146
WCAG relative
Temperature
Cool
66/100 cool
Color family
Violet
Tone
Vivid
Best ink
White
16.26:1
Closest name
Midnight Blue
ΔE2000 8.3
Where it sits
Hue271° of 360°
Saturation72%
Lightness18%
Temperature
Warm ← → Cool66% cool

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

Every format

HEX#2f0d4f
RGBrgb(47, 13, 79)
HSLhsl(271, 72%, 18%)
CMYKcmyk(41%, 84%, 0%, 69%)
LABlab(12.3 31.0 -33.3)
LCHlch(12.3 45.4 312.9)
OKLCHoklch(0.258 0.112 302.4)
Decimal3083599
Display P3color(display-p3 0.184 0.051 0.310)

Copy-ready code

/* CSS */
color: #2f0d4f;
background-color: #2f0d4f;
/* Tailwind (arbitrary) */
class="text-[#2f0d4f] bg-[#2f0d4f]"
/* SCSS */
$brand: #2f0d4f;
/* SwiftUI */
Color(red: 0.184, green: 0.051, blue: 0.310)
/* Android */
Color.parseColor("#2f0d4f")
/* Flutter */
Color(0xFF2F0D4F)
/* Python / OpenCV (BGR) */
(79, 13, 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 #2f0d4f · 16.26:1
Use #ffffffAAA at every size.
Aa
White text · 16.26:1 · recommended
AA pass · AA large pass · AAA pass
Aa
Black text · 1.29:1
AA fail · AA large fail · AAA fail
Reading the other direction: #2f0d4f as text scores 16.26:1 on white and 1.29:1 on black.

Accessibility — WCAG contrast

Aa
#2f0d4f on white: 16.26:1
AA ✓ pass · AA-large · AAA
Aa
#2f0d4f on black: 1.29:1
AA ✗ fail · AA-large · AAA
true color
protanopia · #002051
deuteranopia · #00204E
tritanopia · #281E2D

Color scale — 50 to 950

A Tailwind-shaped ramp built around this exact hex. #2f0d4f 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.

#F7F3FC
#F0E7F8
#DEC9F3
#C89FEF
#AD6FE7
#913EDF
#7D23D2
#681DAF
#53178C
#3E1566
#2f0d4f
Base = 950Lightest = 50 · #F7F3FCDarkest = 950 · #2f0d4f
:root {
  --brand-50: #F7F3FC;
  --brand-100: #F0E7F8;
  --brand-200: #DEC9F3;
  --brand-300: #C89FEF;
  --brand-400: #AD6FE7;
  --brand-500: #913EDF;
  --brand-600: #7D23D2;
  --brand-700: #681DAF;
  --brand-800: #53178C;
  --brand-900: #3E1566;
  --brand-950: #2f0d4f;
  --brand: #2f0d4f;
  --brand-ink: #ffffff;
}

Colors that work with #2f0d4f

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#F7F4FA
Tinted page background
Border#D7C0ED
Hairlines and dividers
Muted text#744B9B
Captions on the surface
Accent#3E510B
Second voice, not a rival
Dark variant#41126D
Hover, pressed, headers
Light variant#F3E9FB
Selected rows, tints
Dark surface#1C1424
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 #2f0d4f

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#2D4F0D
Analogous left#0E0D4F
Analogous right#4F0D4E
Split-complement 1#4E4F0D
Split-complement 2#0D4F0E
Triadic 1#4F2F0D
Triadic 2#0D4F2F
Tetradic#4F0E0D

RGB percentages

Red18.4%
Green5.1%
Blue31.0%

CMYK percentages

Cyan40.5%
Magenta83.5%
Yellow0.0%
Key (black)69.0%

Color previews

#2f0d4f text on a black background

contrast 1.29:1

Card sample

#2f0d4f text on a white background

contrast 16.26:1

Card sample

CSS3 live lab

Text font color

The quick brown fox

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

Glowing headline

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

Soft neon halo

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

Monochromatic scale

Palettes built from #2f0d4f

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.

#2f0d4f 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

Converts to four-color process without much drama. Proof it anyway.

#2f0d4f, answered

What color is #2f0d4f?

#2f0d4f is a deep vivid violet, closest to Midnight Blue (ΔE2000 8.3). It sits at 271° on the hue wheel with 72% saturation and 18% lightness, which reads as cool.

What is the RGB value of #2f0d4f?

rgb(47, 13, 79) — 47 red, 13 green and 79 blue out of 255, or 18.4% / 5.1% / 31% by channel.

Is #2f0d4f a light or a dark color?

It is a dark color. Relative luminance is 0.0146 and perceived brightness is 15%, so white text on it reaches 16.26:1.

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

White. It scores 16.26:1 against #2f0d4f, versus 1.29:1 for black — AAA at any size.

What is the complementary color of #2f0d4f?

#2D4F0D sits directly opposite on the wheel. Softer options are the split-complements #4E4F0D and #0D4F0E, which give the same contrast with far less vibration.

What colors go well with #2f0d4f?

For interface work: #F7F4FA as the surface, #D7C0ED for borders, #744B9B for secondary text, #3E510B as an accent and #41126D for hover and pressed states. For a palette, the analogous pair #0E0D4F and #4F0D4E stays calm, while #2D4F0D is the loudest partner.

What is #2f0d4f in CMYK for printing?

cmyk(41%, 84%, 0%, 69%). This is a screen-to-ink approximation — ask your printer for a proof before committing to a run.

Is #2f0d4f warm or cool?

Cool — it scores 66 on a scale where 0 is the warmest orange and 100 the coolest azure. Nudged warmer it becomes #470D4F; nudged cooler, #160C50.

Work with #2f0d4f in the Color Lab