Skip to content

#2f2c7c

a dark, vivid blue · cool · closest name: Midnight Blue

RGB
47, 44, 124
HSL
242°, 48%, 33%
CMYK
62, 65, 0, 51
Luminance
0.0386

At a glance

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

Hex
#2f2c7c
Hue
242°
blue
Saturation
48%
vivid
Lightness
33%
dark
Brightness
49%
HSV value
Perceived
23%
weighted brightness
Luminance
0.0386
WCAG relative
Temperature
Cool
82/100 cool
Color family
Blue
Tone
Vivid
Best ink
White
11.85:1
Closest name
Midnight Blue
ΔE2000 5.4
Where it sits
Hue242° of 360°
Saturation48%
Lightness33%
Temperature
Warm ← → Cool82% 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#2f2c7c
RGBrgb(47, 44, 124)
HSLhsl(242, 48%, 33%)
CMYKcmyk(62%, 65%, 0%, 51%)
LABlab(23.2 26.8 -45.2)
LCHlch(23.2 52.5 300.7)
OKLCHoklch(0.349 0.131 278.8)
Decimal3091580
Display P3color(display-p3 0.184 0.173 0.486)

Copy-ready code

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

Accessibility — WCAG contrast

Aa
#2f2c7c on white: 11.85:1
AA ✓ pass · AA-large · AAA
Aa
#2f2c7c on black: 1.77:1
AA ✗ fail · AA-large · AAA
true color
protanopia · #003B7F
deuteranopia · #00347A
tritanopia · #00404F

Color scale — 50 to 950

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

#F5F5FA
#EAEAF5
#D1D0EC
#AEACE2
#8683D3
#5D59C4
#4440B5
#393597
#2f2c7c
#242258
#171537
Base = 800Lightest = 50 · #F5F5FADarkest = 950 · #171537
:root {
  --brand-50: #F5F5FA;
  --brand-100: #EAEAF5;
  --brand-200: #D1D0EC;
  --brand-300: #AEACE2;
  --brand-400: #8683D3;
  --brand-500: #5D59C4;
  --brand-600: #4440B5;
  --brand-700: #393597;
  --brand-800: #2f2c7c;
  --brand-900: #242258;
  --brand-950: #171537;
  --brand: #2f2c7c;
  --brand-ink: #ffffff;
}

Colors that work with #2f2c7c

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#F5F4FA
Tinted page background
Border#C4C3EA
Hairlines and dividers
Muted text#4E4B9B
Captions on the surface
Accent#7F6D29
Second voice, not a rival
Dark variant#24215E
Hover, pressed, headers
Light variant#EDECF8
Selected rows, tints
Dark surface#141424
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 #2f2c7c

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#797C2C
Analogous left#2C517C
Analogous right#572C7C
Split-complement 1#7C572C
Split-complement 2#517C2C
Triadic 1#7C2F2C
Triadic 2#2C7C2F
Tetradic#7C2C51

RGB percentages

Red18.4%
Green17.3%
Blue48.6%

CMYK percentages

Cyan62.1%
Magenta64.5%
Yellow0.0%
Key (black)51.4%

Color previews

#2f2c7c text on a black background

contrast 1.77:1

Card sample

#2f2c7c text on a white background

contrast 11.85:1

Card sample

CSS3 live lab

Text font color

The quick brown fox

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

Glowing headline

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

Soft neon halo

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

Monochromatic scale

Palettes built from #2f2c7c

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.

#2f2c7c in the real world

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

Industries
TechnologyFinanceHealthcareEnterprise SaaS
Common UI roles
ButtonsLinksFocus statesCharts
Print note

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

#2f2c7c, answered

What color is #2f2c7c?

#2f2c7c is a dark vivid blue, closest to Midnight Blue (ΔE2000 5.4). It sits at 242° on the hue wheel with 48% saturation and 33% lightness, which reads as cool.

What is the RGB value of #2f2c7c?

rgb(47, 44, 124) — 47 red, 44 green and 124 blue out of 255, or 18.4% / 17.3% / 48.6% by channel.

Is #2f2c7c a light or a dark color?

It is a dark color. Relative luminance is 0.0386 and perceived brightness is 23%, so white text on it reaches 11.85:1.

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

White. It scores 11.85:1 against #2f2c7c, versus 1.77:1 for black — AAA at any size.

What is the complementary color of #2f2c7c?

#797C2C sits directly opposite on the wheel. Softer options are the split-complements #7C572C and #517C2C, which give the same contrast with far less vibration.

What colors go well with #2f2c7c?

For interface work: #F5F4FA as the surface, #C4C3EA for borders, #4E4B9B for secondary text, #7F6D29 as an accent and #24215E for hover and pressed states. For a palette, the analogous pair #2C517C and #572C7C stays calm, while #797C2C is the loudest partner.

What is #2f2c7c in CMYK for printing?

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

Is #2f2c7c warm or cool?

Cool — it scores 82 on a scale where 0 is the warmest orange and 100 the coolest azure. Nudged warmer it becomes #4C2C7C; nudged cooler, #2A457E.

Work with #2f2c7c in the Color Lab