Skip to content

#2f1cd7

a balanced, electric blue · cool · closest name: Medium Blue

RGB
47, 28, 215
HSL
246°, 77%, 48%
CMYK
78, 87, 0, 16
Luminance
0.0634

At a glance

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

Hex
#2f1cd7
Hue
246°
blue
Saturation
77%
electric
Lightness
48%
balanced
Brightness
84%
HSV value
Perceived
31%
weighted brightness
Luminance
0.0634
WCAG relative
Temperature
Cool
80/100 cool
Color family
Blue
Tone
Electric
Best ink
White
9.26:1
Closest name
Medium Blue
ΔE2000 4.1
Where it sits
Hue246° of 360°
Saturation77%
Lightness48%
Temperature
Warm ← → Cool80% 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#2f1cd7
RGBrgb(47, 28, 215)
HSLhsl(246, 77%, 48%)
CMYKcmyk(78%, 87%, 0%, 16%)
LABlab(30.3 63.7 -88.5)
LCHlch(30.3 109.0 305.8)
OKLCHoklch(0.427 0.256 271.8)
Decimal3087575
Display P3color(display-p3 0.184 0.110 0.843)

Copy-ready code

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

Accessibility — WCAG contrast

Aa
#2f1cd7 on white: 9.26:1
AA ✓ pass · AA-large · AAA
Aa
#2f1cd7 on black: 2.27:1
AA ✗ fail · AA-large · AAA
true color
protanopia · #0050DC
deuteranopia · #003ED4
tritanopia · #005D80

Color scale — 50 to 950

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

#F4F3FC
#E8E7F9
#CCC7F4
#A49CF2
#776AEC
#4A38E5
#2f1cd7
#2717B5
#201390
#1B1269
#110B41
Base = 600Lightest = 50 · #F4F3FCDarkest = 950 · #110B41
:root {
  --brand-50: #F4F3FC;
  --brand-100: #E8E7F9;
  --brand-200: #CCC7F4;
  --brand-300: #A49CF2;
  --brand-400: #776AEC;
  --brand-500: #4A38E5;
  --brand-600: #2f1cd7;
  --brand-700: #2717B5;
  --brand-800: #201390;
  --brand-900: #1B1269;
  --brand-950: #110B41;
  --brand: #2f1cd7;
  --brand-ink: #ffffff;
}

Colors that work with #2f1cd7

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#C4C0ED
Hairlines and dividers
Muted text#534B9B
Captions on the surface
Accent#B9A013
Second voice, not a rival
Dark variant#190F71
Hover, pressed, headers
Light variant#EAE8FC
Selected rows, tints
Dark surface#151424
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 #2f1cd7

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
  • Brand accents, badges and data highlights
Use with care
  • Text on black or near-black surfaces
  • Full-page backgrounds — tiring over long sessions
  • 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#C4D71C
Analogous left#1C66D7
Analogous right#8C1CD7
Split-complement 1#D78C1C
Split-complement 2#66D71C
Triadic 1#D72F1C
Triadic 2#1CD72F
Tetradic#D71C66

RGB percentages

Red18.4%
Green11.0%
Blue84.3%

CMYK percentages

Cyan78.1%
Magenta87.0%
Yellow0.0%
Key (black)15.7%

Color previews

#2f1cd7 text on a black background

contrast 2.27:1

Card sample

#2f1cd7 text on a white background

contrast 9.26:1

Card sample

CSS3 live lab

Text font color

The quick brown fox

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

Glowing headline

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

Soft neon halo

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

Monochromatic scale

Palettes built from #2f1cd7

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.

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

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

#2f1cd7, answered

What color is #2f1cd7?

#2f1cd7 is a balanced electric blue, closest to Medium Blue (ΔE2000 4.1). It sits at 246° on the hue wheel with 77% saturation and 48% lightness, which reads as cool.

What is the RGB value of #2f1cd7?

rgb(47, 28, 215) — 47 red, 28 green and 215 blue out of 255, or 18.4% / 11% / 84.3% by channel.

Is #2f1cd7 a light or a dark color?

It is a dark color. Relative luminance is 0.0634 and perceived brightness is 31%, so white text on it reaches 9.26:1.

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

White. It scores 9.26:1 against #2f1cd7, versus 2.27:1 for black — AAA at any size.

What is the complementary color of #2f1cd7?

#C4D71C sits directly opposite on the wheel. Softer options are the split-complements #D78C1C and #66D71C, which give the same contrast with far less vibration.

What colors go well with #2f1cd7?

For interface work: #F5F4FA as the surface, #C4C0ED for borders, #534B9B for secondary text, #B9A013 as an accent and #190F71 for hover and pressed states. For a palette, the analogous pair #1C66D7 and #8C1CD7 stays calm, while #C4D71C is the loudest partner.

What is #2f1cd7 in CMYK for printing?

cmyk(78%, 87%, 0%, 16%). 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 #2f1cd7 warm or cool?

Cool — it scores 80 on a scale where 0 is the warmest orange and 100 the coolest azure. Nudged warmer it becomes #731CD7; nudged cooler, #1940D9.

Work with #2f1cd7 in the Color Lab