Skip to content

#2d044d

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

RGB
45, 4, 77
HSL
274°, 90%, 16%
CMYK
42, 95, 0, 70
Luminance
0.0118

At a glance

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

Hex
#2d044d
Hue
274°
violet
Saturation
90%
electric
Lightness
16%
deep
Brightness
30%
HSV value
Perceived
14%
weighted brightness
Luminance
0.0118
WCAG relative
Temperature
Cool
65/100 cool
Color family
Violet
Tone
Electric
Best ink
White
16.99:1
Closest name
Midnight Blue
ΔE2000 8.9
Where it sits
Hue274° of 360°
Saturation90%
Lightness16%
Temperature
Warm ← → Cool65% 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#2d044d
RGBrgb(45, 4, 77)
HSLhsl(274, 90%, 16%)
CMYKcmyk(42%, 95%, 0%, 70%)
LABlab(10.4 34.1 -35.0)
LCHlch(10.4 48.9 314.3)
OKLCHoklch(0.244 0.120 303.4)
Decimal2950221
Display P3color(display-p3 0.176 0.016 0.302)

Copy-ready code

/* CSS */
color: #2d044d;
background-color: #2d044d;
/* Tailwind (arbitrary) */
class="text-[#2d044d] bg-[#2d044d]"
/* SCSS */
$brand: #2d044d;
/* SwiftUI */
Color(red: 0.176, green: 0.016, blue: 0.302)
/* Android */
Color.parseColor("#2d044d")
/* Flutter */
Color(0xFF2D044D)
/* Python / OpenCV (BGR) */
(77, 4, 45)

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 #2d044d · 16.99:1
Use #ffffffAAA at every size.
Aa
White text · 16.99:1 · recommended
AA pass · AA large pass · AAA pass
Aa
Black text · 1.24:1
AA fail · AA large fail · AAA fail
Reading the other direction: #2d044d as text scores 16.99:1 on white and 1.24:1 on black.

Accessibility — WCAG contrast

Aa
#2d044d on white: 16.99:1
AA ✓ pass · AA-large · AAA
Aa
#2d044d on black: 1.24:1
AA ✗ fail · AA-large · AAA
true color
protanopia · #001C4F
deuteranopia · #001C4C
tritanopia · #261A2A

Color scale — 50 to 950

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

#F8F2FD
#F1E5FB
#E1C3F8
#CD94F9
#B45FF7
#9B2AF4
#880CE9
#710AC2
#5B089B
#430A70
#2d044d
Base = 950Lightest = 50 · #F8F2FDDarkest = 950 · #2d044d
:root {
  --brand-50: #F8F2FD;
  --brand-100: #F1E5FB;
  --brand-200: #E1C3F8;
  --brand-300: #CD94F9;
  --brand-400: #B45FF7;
  --brand-500: #9B2AF4;
  --brand-600: #880CE9;
  --brand-700: #710AC2;
  --brand-800: #5B089B;
  --brand-900: #430A70;
  --brand-950: #2d044d;
  --brand: #2d044d;
  --brand-ink: #ffffff;
}

Colors that work with #2d044d

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#F8F4FA
Tinted page background
Border#D9C0ED
Hairlines and dividers
Muted text#784B9B
Captions on the surface
Accent#374F02
Second voice, not a rival
Dark variant#470679
Hover, pressed, headers
Light variant#F4E7FE
Selected rows, tints
Dark surface#1D1424
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 #2d044d

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#244D04
Analogous left#09044D
Analogous right#4D0449
Split-complement 1#494D04
Split-complement 2#044D09
Triadic 1#4D2D04
Triadic 2#044D2D
Tetradic#4D0904

RGB percentages

Red17.6%
Green1.6%
Blue30.2%

CMYK percentages

Cyan41.6%
Magenta94.8%
Yellow0.0%
Key (black)69.8%

Color previews

#2d044d text on a black background

contrast 1.24:1

Card sample

#2d044d text on a white background

contrast 16.99:1

Card sample

CSS3 live lab

Text font color

The quick brown fox

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

Glowing headline

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

Soft neon halo

text-shadow: 0 0 14px rgba(45, 4, 77, 0.45);
Div box shadow
Elevated card
box-shadow: 0 12px 32px -8px rgba(45, 4, 77, 0.45);
Border & gradient
Gradient panel
border: 3px solid #2d044d;
background: linear-gradient(135deg, #2d044d, #4D043C);

Monochromatic scale

Palettes built from #2d044d

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.

#2d044d 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.

#2d044d, answered

What color is #2d044d?

#2d044d is a deep electric violet, closest to Midnight Blue (ΔE2000 8.9). It sits at 274° on the hue wheel with 90% saturation and 16% lightness, which reads as cool.

What is the RGB value of #2d044d?

rgb(45, 4, 77) — 45 red, 4 green and 77 blue out of 255, or 17.6% / 1.6% / 30.2% by channel.

Is #2d044d a light or a dark color?

It is a dark color. Relative luminance is 0.0118 and perceived brightness is 14%, so white text on it reaches 16.99:1.

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

White. It scores 16.99:1 against #2d044d, versus 1.24:1 for black — AAA at any size.

What is the complementary color of #2d044d?

#244D04 sits directly opposite on the wheel. Softer options are the split-complements #494D04 and #044D09, which give the same contrast with far less vibration.

What colors go well with #2d044d?

For interface work: #F8F4FA as the surface, #D9C0ED for borders, #784B9B for secondary text, #374F02 as an accent and #470679 for hover and pressed states. For a palette, the analogous pair #09044D and #4D0449 stays calm, while #244D04 is the loudest partner.

What is #2d044d in CMYK for printing?

cmyk(42%, 95%, 0%, 70%). 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 #2d044d warm or cool?

Cool — it scores 65 on a scale where 0 is the warmest orange and 100 the coolest azure. Nudged warmer it becomes #48044D; nudged cooler, #12034E.

Work with #2d044d in the Color Lab