#342cfb
a balanced, electric blue · cool · closest name: Blue
At a glance
Every number on this page in one read: what #342cfb is made of, how bright it looks, and which way it leans.
Reads cool. Warm and cool siblings keep the same lightness, so you can swap one in without redoing your contrast maths.
Every format
| HEX | #342cfb |
| RGB | rgb(52, 44, 251) |
| HSL | hsl(242, 96%, 58%) |
| CMYK | cmyk(79%, 83%, 0%, 2%) |
| LAB | lab(36.9 67.9 -97.9) |
| LCH | lch(36.9 119.1 304.8) |
| OKLCH | oklch(0.486 0.283 270.5) |
| Decimal | 3419387 |
| Display P3 | color(display-p3 0.204 0.173 0.984) |
Copy-ready code
/* CSS */
color: #342cfb;
background-color: #342cfb;
/* Tailwind (arbitrary) */
class="text-[#342cfb] bg-[#342cfb]"
/* SCSS */
$brand: #342cfb;
/* SwiftUI */
Color(red: 0.204, green: 0.173, blue: 0.984)
/* Android */
Color.parseColor("#342cfb")
/* Flutter */
Color(0xFF342CFB)
/* Python / OpenCV (BGR) */
(251, 44, 52)Best text color
Only one of black and white can be right. This is the one, with the number that proves it.
Accessibility — WCAG contrast
Color scale — 50 to 950
A Tailwind-shaped ramp built around this exact hex. #342cfb 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.
:root {
--brand-50: #F2F1FD;
--brand-100: #E5E4FC;
--brand-200: #C3C1FA;
--brand-300: #9591FD;
--brand-400: #605AFC;
--brand-500: #342cfb;
--brand-600: #0E05F0;
--brand-700: #0B04C8;
--brand-800: #0903A0;
--brand-900: #0B0773;
--brand-950: #070448;
--brand: #342cfb;
--brand-ink: #ffffff;
}Colors that work with #342cfb
Not a palette — a role sheet. Each swatch answers one question you will hit while building the component.
Surface, border, heading and body all derive from this one hue, so the screen stays coherent without a second palette.
Lightness flips, hue holds. The accent stays the anchor in both themes.
How to use #342cfb
Derived from its contrast, chroma and lightness — not from taste.
- ✓Body text and links on white
- ✓Primary buttons and calls to action
- ✓Focus rings, active and selected states
- ✓Brand accents, badges and data highlights
- ⚠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 | #F3FB2C | Directly opposite — maximum tension | |
| Analogous left | #2C8BFB | Neighbour, quieter | |
| Analogous right | #9B2CFB | Neighbour, quieter | |
| Split-complement 1 | #FB9B2C | Contrast without the clash | |
| Split-complement 2 | #8BFB2C | Contrast without the clash | |
| Triadic 1 | #FB342C | Even thirds — balanced and loud | |
| Triadic 2 | #2CFB34 | Even thirds — balanced and loud | |
| Tetradic | #FB2C8B | Fourth corner of the square scheme |
RGB percentages
CMYK percentages
Color previews
#342cfb text on a black background
contrast 2.90:1
#342cfb text on a white background
contrast 7.24:1
CSS3 live lab
The quick brown fox
color: #342cfb;
background-color: #342cfb;
Glowing headline
text-shadow: 2px 2px 8px #342cfb;
Soft neon halo
text-shadow: 0 0 14px rgba(52, 44, 251, 0.45);
box-shadow: 0 12px 32px -8px rgba(52, 44, 251, 0.45);
border: 3px solid #342cfb; background: linear-gradient(135deg, #342cfb, #BE2CFB);
Monochromatic scale
Palettes built from #342cfb
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.
Closest color with a full write-up: Ultramarine (#3f00ff) — ΔE2000 3.6 away, with its history, psychology and brand usage.
#342cfb in the real world
Where a color in this family tends to land, and the interface roles it is usually asked to play.
Sits outside most CMYK gamuts — expect a duller press result, or specify a spot ink.
#342cfb, answered
What color is #342cfb?
#342cfb is a balanced electric blue, closest to Blue (ΔE2000 4.5). It sits at 242° on the hue wheel with 96% saturation and 58% lightness, which reads as cool.
What is the RGB value of #342cfb?
rgb(52, 44, 251) — 52 red, 44 green and 251 blue out of 255, or 20.4% / 17.3% / 98.4% by channel.
Is #342cfb a light or a dark color?
It is a dark color. Relative luminance is 0.0950 and perceived brightness is 37%, so white text on it reaches 7.24:1.
Should I use black or white text on #342cfb?
White. It scores 7.24:1 against #342cfb, versus 2.90:1 for black — AAA at any size.
What is the complementary color of #342cfb?
#F3FB2C sits directly opposite on the wheel. Softer options are the split-complements #FB9B2C and #8BFB2C, which give the same contrast with far less vibration.
What colors go well with #342cfb?
For interface work: #F5F4FA as the surface, #C1C0ED for borders, #4E4B9B for secondary text, #CCA000 as an accent and #07027D for hover and pressed states. For a palette, the analogous pair #2C8BFB and #9B2CFB stays calm, while #F3FB2C is the loudest partner.
What is #342cfb in CMYK for printing?
cmyk(79%, 83%, 0%, 2%). 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 #342cfb 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 #802CFB; nudged cooler, #2A56FD.