Steel blue #2E86C1
- Color
- #2E86C1
- RGB
- rgb(46, 134, 193)
- HSL
- hsl(204.1, 61.5%, 46.9%)
- HSV / HSB
- hsv(204.1, 76.2%, 75.7%)
- CMYK
- cmyk(76.2%, 30.6%, 0.0%, 24.3%)
Checked against: colorsys.rgb_to_hls / rgb_to_hsv on (46, 134, 193)/255, formatted to 1 dp
Convert a color from HEX to RGB, HSL, HSV, CMYK, CIE Lab and OKLCH or back, and find its nearest CSS named color and relative luminance.
By AdminDrafted with AI writing toolsUpdated Checked examples: 6
#2E86C1 is hsl(204.1, 61.5%, 46.9%) in HSL: hue 204°, 62% saturation, 47% lightness. The closest CSS name is “steelblue” (#4682B4).
Read as hex.
This is the textbook formula with no ink limit or printer profile.
Uses the IEC 61966-2-1 transfer curve and the CSS Color 4 sRGB-to-XYZ matrix.
CSS lab() uses a D50 white instead, so its numbers differ slightly from these D65 values.
LMS cone responses are cube-rooted between Ottosson's two matrices.
Nearest CSS name: steelblue. Distance is the straight-line gap in OKLab. CSS Color 4 uses 0.02 as a just-noticeable difference for its gamut mapping.
The converter reads the listed color formats into sRGB channels between 0 and 1, then derives each format from them: HEX and RGB scale the channels to 0–255, HSL and HSV come from the largest and smallest channel, and CMYK sets K = 1 − max(R, G, B). For CIE Lab and OKLCH it first removes the sRGB gamma curve of IEC 61966-2-1, converts to CIE XYZ with the D65 white point, then applies the CIE 15 and Ottosson (2020) formulas.
Designers and front-end developers use it to move a color between CSS, design tools and print specs. The default, #2E86C1, is rgb(46, 134, 193), hsl(204.1, 61.5%, 46.9%) and oklch(59.57% 0.1217 242.57), and its nearest CSS named color is steelblue (#4682B4).
CMYK here is the plain formula with no printer profile, so a print shop's values will differ. The lab() input and CIE Lab output here use D65; CSS lab() uses D50 and is not interchangeable. Transparency is ignored, and colors outside sRGB are clipped.
Split the six hex digits into three pairs and convert each pair from base 16 to base 10: the first digit times 16, plus the second. #2E86C1 gives 2E = 2 × 16 + 14 = 46, 86 = 134 and C1 = 193, so it is rgb(46, 134, 193). The same steps decode any color code from CSS, HTML or a design tool.
Divide each channel by 16: the quotient is the first hex digit and the remainder the second, with 10–15 written A–F. For rgb(34, 34, 34), every channel is 34 = 2 × 16 + 2, so the code is #222222, a dark neutral gray.
Pad values below 16 with a leading zero: 9 becomes 09, so rgb(9, 9, 9) is #090909. All three channels are needed, since a lone 34 leaves the other two unknown.
Three-digit shorthand doubles each digit: #F80 is #FF8800, or rgb(255, 136, 0).
These are the CSS keyword values from the W3C named-color table, the definitions every browser uses. They name web colors, not paint, pigment or print standards.
| CSS name | HEX | RGB |
|---|---|---|
| purple | #800080 | rgb(128, 0, 128) |
| violet | #EE82EE | rgb(238, 130, 238) |
| gray | #808080 | rgb(128, 128, 128) |
| grey | #808080 | rgb(128, 128, 128) |
| green | #008000 | rgb(0, 128, 0) |
| lime | #00FF00 | rgb(0, 255, 0) |
| brown | #A52A2A | rgb(165, 42, 42) |
| black | #000000 | rgb(0, 0, 0) |
| pink | #FFC0CB | rgb(255, 192, 203) |
| white | #FFFFFF | rgb(255, 255, 255) |
| ivory | #FFFFF0 | rgb(255, 255, 240) |
| yellow | #FFFF00 | rgb(255, 255, 0) |
| red | #FF0000 | rgb(255, 0, 0) |
| teal | #008080 | rgb(0, 128, 128) |
| orange | #FFA500 | rgb(255, 165, 0) |
| lavender | #E6E6FA | rgb(230, 230, 250) |
| cyan | #00FFFF | rgb(0, 255, 255) |
For lighter and darker versions of one color, use the palette generator.
Both use the same hue angle but define the other two numbers differently. With channels scaled to 0–1, #2E86C1 has a largest channel of 0.757 (blue) and a smallest of 0.180 (red):
The percentages are not interchangeable. CSS has hsl() but no hsv(), and design tools often call HSV "HSB".
CMYK here is the plain formula: K = 1 − max, then C = (1 − R − K) ÷ (1 − K), and the same for M and Y. #2E86C1 is cmyk(76.2%, 30.6%, 0.0%, 24.3%). A print shop converts through an ICC profile for its paper and press, so its numbers will differ.
CIE Lab here uses the D65 white point, while CSS lab() uses D50, so the same three numbers describe slightly different colors. Keep the white point with any Lab value you copy.
OKLCH gives lightness, chroma and hue in Björn Ottosson's OKLab space, so #2E86C1 is oklch(59.57% 0.1217 242.57). A gray has zero chroma, and its hue is written none.
The nearest named color is the one closest in OKLab. For #2E86C1 that is steelblue, #4682B4, at a distance of 0.0244: close, but a different color. Keep the original HEX when you need the exact color.
#2E86C1CC and rgba() convert as the opaque color, with a warning.hsl(120, 100%, 25.1%) rounds to #008000, the CSS green.oklch() value outside sRGB is clipped before converting: oklch(70% 0.4 150) comes back as #00D600.currentcolor, transparent and var(--brand) only mean something inside a stylesheet, so they are rejected.To check a text and background pair, use the contrast checker, which works from the same relative luminance.
Checked against: colorsys.rgb_to_hls / rgb_to_hsv on (46, 134, 193)/255, formatted to 1 dp
Checked against: Separate exact decimal arithmetic script of the CIE 15 Lab (D65) and Ottosson OKLab formulas; matches Bruce Lindbloom's sRGB/D65 red (53.24, 80.09, 67.20) and CSS Color 4's oklch(62.8% 0.2577 29.23)
Checked against: CSS Color 4 §6.1 green = #008000
Checked against: Definition: max = min = 1 gives zero saturation and chroma; CSS Color 4 treats the hue of an achromatic color as powerless (none)
Split the six hex digits into three pairs and convert each pair from base 16 to decimal: #2E86C1 is 2E = 46, 86 = 134 and C1 = 193, so rgb(46, 134, 193). A three-digit shorthand doubles each digit, so #F80 means #FF8800. To go the other way, write each 0–255 channel as two hex digits, padding with a leading 0 below 16.
Both use the same hue angle but define the other two values differently. HSL lightness is the average of the largest and smallest channel, so pure colors sit at 50% and white at 100%; HSV value is the largest channel, so pure colors sit at 100%. #2E86C1 is hsl(204.1, 61.5%, 46.9%) but hsv(204.1, 76.2%, 75.7%). CSS has hsl() and hwb() but no hsv().
A plain conversion only rearranges screen RGB: K = 1 − max(R, G, B) and each ink is (1 − channel − K) ÷ (1 − K), with no knowledge of paper, ink or press. Print workflows convert through an ICC profile such as FOGRA39 or GRACoL 2006, which limits total ink coverage and shifts colors, so treat these numbers as a starting point and ask the printer for their profile.
OKLCH is the polar form of Björn Ottosson's 2020 OKLab space: lightness L, chroma C and hue h. Equal steps in L look about equally different in brightness across hues, which HSL does not manage, so it suits palettes and accessible color scales. CSS Color Level 4 defines oklch(), and every major browser has supported it since 2023. Pure red is oklch(62.8% 0.2577 29.23).
Relative luminance is a color's brightness on a scale from 0 (black) to 1 (white), computed on linear channels after removing the sRGB gamma curve: L = 0.2126 R + 0.7152 G + 0.0722 B. Green weighs most because the eye is most sensitive to it, so pure red scores 0.2126 and #2E86C1 scores 0.2148. WCAG uses it for contrast ratios, (L1 + 0.05) ÷ (L2 + 0.05).
This calculator includes 6 worked examples with independently sourced answers. They run in the test suite, and you can run them here too.