Skip to content

#331bfc

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

RGB
51, 27, 252
HSL
246°, 97%, 55%
CMYK
80, 89, 0, 1
Luminance
0.0852

At a glance

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

Hex
#331bfc
Hue
246°
blue
Saturation
97%
electric
Lightness
55%
balanced
Brightness
99%
HSV value
Perceived
36%
weighted brightness
Luminance
0.0852
WCAG relative
Temperature
Cool
80/100 cool
Color family
Blue
Tone
Electric
Best ink
White
7.77:1
Closest name
Blue
ΔE2000 2.5
Where it sits
Hue246° of 360°
Saturation97%
Lightness55%
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#331bfc
RGBrgb(51, 27, 252)
HSLhsl(246, 97%, 55%)
CMYKcmyk(80%, 89%, 0%, 1%)
LABlab(35.0 74.0 -101.6)
LCHlch(35.0 125.7 306.1)
OKLCHoklch(0.473 0.294 270.6)
Decimal3349500
Display P3color(display-p3 0.200 0.106 0.988)

Copy-ready code

/* CSS */
color: #331bfc;
background-color: #331bfc;
/* Tailwind (arbitrary) */
class="text-[#331bfc] bg-[#331bfc]"
/* SCSS */
$brand: #331bfc;
/* SwiftUI */
Color(red: 0.200, green: 0.106, blue: 0.988)
/* Android */
Color.parseColor("#331bfc")
/* Flutter */
Color(0xFF331BFC)
/* Python / OpenCV (BGR) */
(252, 27, 51)

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

Accessibility — WCAG contrast

Aa
#331bfc on white: 7.77:1
AA ✓ pass · AA-large · AAA
Aa
#331bfc on black: 2.70:1
AA ✗ fail · AA-large · AAA
true color
protanopia · #005DFF
deuteranopia · #0047F9
tritanopia · #006C96

Color scale — 50 to 950

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

#F3F1FD
#E6E4FC
#C7C1FB
#9C90FE
#6A59FD
#331bfc
#1D03F2
#1803C9
#1302A1
#120674
#0B0449
Base = 500Lightest = 50 · #F3F1FDDarkest = 950 · #0B0449
:root {
  --brand-50: #F3F1FD;
  --brand-100: #E6E4FC;
  --brand-200: #C7C1FB;
  --brand-300: #9C90FE;
  --brand-400: #6A59FD;
  --brand-500: #331bfc;
  --brand-600: #1D03F2;
  --brand-700: #1803C9;
  --brand-800: #1302A1;
  --brand-900: #120674;
  --brand-950: #0B0449;
  --brand: #331bfc;
  --brand-ink: #ffffff;
}

Colors that work with #331bfc

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#C5C0ED
Hairlines and dividers
Muted text#534B9B
Captions on the surface
Accent#CCAF00
Second voice, not a rival
Dark variant#0F027E
Hover, pressed, headers
Light variant#E8E6FF
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 #331bfc

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#E4FC1B
Analogous left#1B73FC
Analogous right#A31BFC
Split-complement 1#FCA31B
Split-complement 2#73FC1B
Triadic 1#FC331B
Triadic 2#1BFC33
Tetradic#FC1B73

RGB percentages

Red20.0%
Green10.6%
Blue98.8%

CMYK percentages

Cyan79.8%
Magenta89.3%
Yellow0.0%
Key (black)1.2%

Color previews

#331bfc text on a black background

contrast 2.70:1

Card sample

#331bfc text on a white background

contrast 7.77:1

Card sample

CSS3 live lab

Text font color

The quick brown fox

color: #331bfc;
Background color
Panel with #331bfc background
background-color: #331bfc;
Text shadow — hex

Glowing headline

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

Soft neon halo

text-shadow: 0 0 14px rgba(51, 27, 252, 0.45);
Div box shadow
Elevated card
box-shadow: 0 12px 32px -8px rgba(51, 27, 252, 0.45);
Border & gradient
Gradient panel
border: 3px solid #331bfc;
background: linear-gradient(135deg, #331bfc, #C91BFC);

Monochromatic scale

Palettes built from #331bfc

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.

#331bfc 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.

#331bfc, answered

What color is #331bfc?

#331bfc is a balanced electric blue, closest to Blue (ΔE2000 2.5). It sits at 246° on the hue wheel with 97% saturation and 55% lightness, which reads as cool.

What is the RGB value of #331bfc?

rgb(51, 27, 252) — 51 red, 27 green and 252 blue out of 255, or 20% / 10.6% / 98.8% by channel.

Is #331bfc a light or a dark color?

It is a dark color. Relative luminance is 0.0852 and perceived brightness is 36%, so white text on it reaches 7.77:1.

Should I use black or white text on #331bfc?

White. It scores 7.77:1 against #331bfc, versus 2.70:1 for black — AAA at any size.

What is the complementary color of #331bfc?

#E4FC1B sits directly opposite on the wheel. Softer options are the split-complements #FCA31B and #73FC1B, which give the same contrast with far less vibration.

What colors go well with #331bfc?

For interface work: #F5F4FA as the surface, #C5C0ED for borders, #534B9B for secondary text, #CCAF00 as an accent and #0F027E for hover and pressed states. For a palette, the analogous pair #1B73FC and #A31BFC stays calm, while #E4FC1B is the loudest partner.

What is #331bfc in CMYK for printing?

cmyk(80%, 89%, 0%, 1%). 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 #331bfc 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 #851BFC; nudged cooler, #1940FE.

Work with #331bfc in the Color Lab