HSL(242, 42%, 17%)
Blue — Blue color
Adjust Color
Color Information
Color Name
Blue
Color Family
Blue
Warm / Cool
🔵 Cool
Temperature
9000K
CSS Class
bg-[hsl(242,42%,17%)]
Color Conversions
| Format | Value | CSS Usage | |
|---|---|---|---|
| HSL | hsl(242, 42%, 17%) | color: hsl(242, 42%, 17%) | |
| HEX | #1A193E | color: #1A193E | |
| RGB | rgb(26, 25, 62) | color: rgb(26, 25, 62) | |
| CMYK | cmyk(58%, 60%, 0%, 76%) | — | |
| HSV | hsv(242, 60%, 24%) | — | |
| HWB | hwb(242 10% 76%) | color: hwb(242 10% 76%) | |
| OKLCH | oklch(0.238 0.0688 281.03) | color: oklch(0.238 0.0688 281.03) | |
| Lab | lab(11.01 12.85 -23.65) | color: lab(11.01 12.85 -23.65) | |
| LCH | lch(11.01 26.92 298.52) | color: lch(11.01 26.92 298.52) |
Color Theory
Accessibility (WCAG)
White text on color
Black text on color
Colored text
Contrast Ratios
AA Normal (4.5:1)
AA Large (3:1)
AAA Normal (7:1)
Best text on this color: white
Color Blindness Simulation
Protanopia (Red-blind)
#1A1A35 — rgb(26, 26, 53)
Deuteranopia (Green-blind)
#1A1A33 — rgb(26, 26, 51)
Tritanopia (Blue-blind)
#1A2E2C — rgb(26, 46, 44)
Tints & Shades
CSS Code Snippets
background
background-color: hsl(242, 42%, 17%);
text
color: hsl(242, 42%, 17%);
border
border: 2px solid hsl(242, 42%, 17%);
gradient light
background: linear-gradient(to right, hsl(242, 42%, 37%), hsl(242, 42%, 17%));
gradient dark
background: linear-gradient(to right, hsl(242, 42%, 17%), hsl(242, 42%, 0%))
hex
background-color: #1A193E;
tailwind
bg-[hsl(242,42%,17%)]
box shadow
box-shadow: 0 4px 6px -1px hsl(242, 42%, 17%, 0.4);
css variable
--color-primary: hsl(242, 42%, 17%);
Related Colors
Use Cases for Blue
Frequently Asked Questions
What are all the color codes for HSL(242, 42%, 17%)?
HEX: #1A193E | RGB: rgb(26, 25, 62) | CMYK: 58%, 60%, 0%, 76% | HSV: 242°, 60%, 24%. Copy any format from the conversion table above.
What colors go well with #1A193E?
The complementary color is HSL(62, 42%, 17%). For a triadic harmony, use hues 242°, 2°, and 122°. For analogous combinations, try hues 212° and 272°. See the Color Harmony section above for complete palettes with previews.
How do I use HSL(242, 42%, 17%) in CSS?
As HSL: color: hsl(242, 42%, 17%); — As HEX: color: #1A193E; — As RGB: color: rgb(26, 25, 62); — Tailwind CSS: bg-[hsl(242,42%,17%)] — CSS variable: --color-primary: hsl(242, 42%, 17%);