Skip to main content

Rgb Hsl Hsv Converter

Convert units with the Rgb Hsl Hsv Converter — enter a value and get accurate converted results instantly using verified formulas.

Skip to calculator
Computer & IT

Rgb Hsl Hsv Converter

Convert colors between RGB, HSL, HSV, HEX, and CMYK. Check WCAG accessibility contrast ratios and explore complementary, analogous, and triadic color harmonies.

Last updated: December 2025

Calculator

Adjust values & calculate
#4285F4 - Blue
HEX
#4285F4
RGB
rgb(66, 133, 244)
HSL
hsl(217, 89%, 61%)
HSV / HSB
hsv(217, 73%, 96%)
CMYK
C:73% M:45% Y:0% K:4%
On White Background
3.56:1
AA FailAAA Fail
On Black Background
5.89:1
AA PassAAA Fail

Color Harmonies

Complementary
#F4B142
Analogous
#42DEF4 | #5842F4
Triadic
#F44285 | #85F442
Relative Luminance
0.2446
Best text color: White (higher contrast)
Your Result
#4285F4 | HSL(217, 89%, 61%) | HSV(217, 73%, 96%) | Blue
Share Your Result
Understand the Math

Formula

H = atan2(sqrt(3)(G-B), 2R-G-B) | S(HSL) = delta/(1-|2L-1|) | L = (max+min)/2

Where R, G, B are normalized to 0-1 range, max and min are the largest and smallest RGB components, delta is max minus min. Hue is computed from the dominant channel and mapped to 0-360 degrees. HSL Saturation depends on lightness, while HSV Saturation equals delta divided by max. HSV Value equals max directly.

Last reviewed: December 2025

Worked Examples

Example 1: Converting Google Blue to HSL and HSV

Google uses the brand color #4285F4 (RGB 66, 133, 244). Convert this to HSL and HSV color spaces.
Solution:
Normalize RGB: R=0.259, G=0.522, B=0.957 Max=0.957 (B), Min=0.259 (R), Delta=0.698 Hue = ((0.259 - 0.522) / 0.698 + 4) x 60 = 217 degrees HSL: S = 0.698 / (1 - |2x0.608 - 1|) = 0.698 / 0.784 = 89% L = (0.957 + 0.259) / 2 = 61% HSV: S = 0.698 / 0.957 = 73%, V = 96% CMYK: C=73%, M=45%, Y=0%, K=4%
Result: HSL(217, 89%, 61%) | HSV(217, 73%, 96%) | CMYK(73%, 45%, 0%, 4%) | Complementary: #F4C342

Example 2: Checking Accessibility of Text Color

A designer wants to use #6B7280 (gray-500) text on a white background. Does it meet WCAG AA standards?
Solution:
RGB: R=107, G=114, B=128 Relative luminance: 0.2126 x 0.137 + 0.7152 x 0.155 + 0.0722 x 0.199 = 0.154 Contrast with white: (1 + 0.05) / (0.154 + 0.05) = 1.05 / 0.204 = 5.14:1 WCAG AA normal text (4.5:1): PASS WCAG AA large text (3:1): PASS WCAG AAA normal text (7:1): FAIL
Result: Contrast ratio 5.14:1 passes WCAG AA for both normal and large text, but fails AAA. For AAA compliance, darken to #4B5563 (gray-600).
Expert Insights

Background & Theory

The Rgb Hsl Hsv Converter applies the following established principles and formulas. Unit conversion is the process of expressing a quantity in a different unit of measurement while preserving its physical meaning. At the foundation of modern measurement lies the International System of Units (SI), which defines seven base units: the meter for length, kilogram for mass, second for time, ampere for electric current, kelvin for thermodynamic temperature, mole for amount of substance, and candela for luminous intensity. All other units, called derived units, are defined as algebraic combinations of these seven. Dimensional analysis is the principal method for performing unit conversions. By treating units as algebraic quantities that can be multiplied, divided, and cancelled, a conversion factor chain allows a value expressed in one unit to be rewritten in another without altering its physical magnitude. For example, to convert 60 miles per hour to meters per second, one multiplies by a chain of conversion factors each equal to one: (1609.34 m / 1 mile) × (1 hour / 3600 s). Metric prefixes enable compact expression of quantities across extreme ranges of magnitude. Standard prefixes span from nano (10^-9) through micro (10^-6) and milli (10^-3) up through kilo (10^3), mega (10^6), and giga (10^9), and beyond in both directions. These prefixes are strictly multiplicative and apply consistently to any SI base or derived unit. Temperature conversions require affine transformations rather than simple scaling. To convert Celsius to Fahrenheit the formula is °F = (°C × 9/5) + 32, while the conversion to the absolute Kelvin scale is K = °C + 273.15. These formulas reflect the different zero points and degree-size conventions of each scale. Significant figures govern how precision is preserved through calculations. A result should not express more precision than the least precise input value permits. In digital storage, IEEE and IEC standards distinguish between decimal prefixes (kilobyte = 1000 bytes) and binary prefixes (kibibyte = 1024 bytes), a distinction that has practical consequences for how storage capacity is reported by manufacturers versus operating systems. Unit coherence — ensuring that all quantities in an equation share a consistent unit system — is essential for obtaining correct results.

History

The history behind the Rgb Hsl Hsv Converter traces back through the following developments. Human beings have been measuring and comparing quantities since before recorded history. The earliest known measurement units were body-based: the cubit (the distance from elbow to fingertip), the foot, the hand, and the digit. The furlong originated as the length of a furrow a team of oxen could plow without resting. These anthropomorphic standards were practical for local use but differed between regions and kingdoms, creating persistent difficulties in trade and construction. The ancient Egyptians standardized the royal cubit at approximately 52.4 centimeters and distributed calibrated granite rods to ensure consistency across building projects, including the pyramids. Roman engineers used the mile (mille passuum, one thousand double paces) and spread these standards throughout their empire via road networks. Despite these efforts, measurement diversity persisted across medieval Europe, hampering commerce. The French Revolution created political will for radical standardization. In 1795 France officially adopted the metric system, defining the meter as one ten-millionth of the distance from the equator to the North Pole along the Paris meridian. This gave the world its first fully decimal, rationally constructed measurement system. The Metre Convention of 1875 established the International Bureau of Weights and Measures (BIPM) in Sevres, France, creating a permanent international body to maintain physical artifact standards and coordinate global metrology. For over a century, the kilogram was defined by a platinum-iridium cylinder locked in a vault near Paris. In 1999, a stark demonstration of what unit inconsistency costs occurred when NASA's Mars Climate Orbiter was lost because one engineering team used pound-force seconds while another used newton seconds. The spacecraft entered the Martian atmosphere at the wrong angle and was destroyed, at a cost of 327 million dollars. In 2019 the SI underwent its most significant revision, redefining all seven base units in terms of fixed numerical values of fundamental physical constants such as the speed of light, Planck's constant, and the elementary charge. This eliminated any reliance on physical artifacts and made the measurement system permanently stable and universally reproducible.

Share this calculator

Explore More

Frequently Asked Questions

RGB (Red, Green, Blue) is an additive color model used in screens and digital displays where colors are created by combining red, green, and blue light at different intensities from 0 to 255. HSL (Hue, Saturation, Lightness) describes colors using a color wheel angle (0-360 degrees), saturation percentage (how vivid the color is), and lightness percentage (how bright or dark). HSV (Hue, Saturation, Value) is similar to HSL but uses Value instead of Lightness, where Value represents the brightness of the color. HSL and HSV are more intuitive for humans because they separate the color identity (hue) from its intensity and brightness, making it easier to create color variations by adjusting individual components independently.
A hex color code is a six-character representation of an RGB color where each pair of characters represents the red, green, and blue channels in hexadecimal (base-16) notation. Each channel ranges from 00 (decimal 0) to FF (decimal 255). For example, pure red is #FF0000 because red is at maximum (FF = 255), while green and blue are at zero (00 = 0). The hex code #4285F4 breaks down to R=66 (42 hex), G=133 (85 hex), B=244 (F4 hex). Hex codes are the most common color format in web development because they are compact and widely supported in CSS, HTML, and design tools. The pound sign prefix is conventional but not always required depending on the context.
CMYK (Cyan, Magenta, Yellow, Key/Black) is a subtractive color model used in printing where colors are created by absorbing light rather than emitting it. While RGB adds light to create colors on screens, CMYK removes light by applying ink on paper. Converting between RGB and CMYK involves mathematical transformations, but the conversion is not perfect because the two models have different color gamuts. RGB can display some vivid colors that CMYK cannot reproduce in print, particularly bright blues and greens. When designing for print, always work in CMYK or verify your colors convert acceptably. The Key component (K) represents black ink, which is used instead of combining maximum cyan, magenta, and yellow because pure black from CMY mixing is imperfect and wastes expensive colored ink.
HSL makes creating color variations intuitive because each component controls a different aspect of the color. To create lighter or darker shades of the same color, keep the hue and saturation constant and adjust the lightness value. Lightness of 50% gives the pure color, lower values create darker shades approaching black, and higher values create lighter tints approaching white. To create muted or pastel versions, reduce the saturation while keeping hue and lightness the same. A saturation of 100% gives the most vivid color, while 0% produces a pure gray. To create analogous color schemes, keep saturation and lightness constant and shift the hue by 15-30 degrees in either direction. This approach is far more intuitive than trying to manipulate RGB values directly.
HSV (Hue, Saturation, Value) and HSB (Hue, Saturation, Brightness) are identical color models with different names. The V in HSV and B in HSB refer to the same measurement. Adobe products typically use HSB terminology while most programming libraries and technical documentation use HSV. Both define colors on a cone-shaped model where the top circular face represents full brightness with varying hue and saturation, and the point at the bottom represents black. HSV/HSB differs from HSL in how it handles brightness. In HSV, a value of 100% means the color is at full brightness, while in HSL, a lightness of 100% always produces white regardless of hue and saturation. HSL 50% lightness gives the purest color, while HSV 100% value gives the brightest version of that color at the current saturation.
You may use the results for reference and educational purposes. For professional reports, academic papers, or critical decisions, we recommend verifying outputs against peer-reviewed sources or consulting a qualified expert in the relevant field.
Educational Note: This calculator is provided for educational and informational purposes. Results are based on the formulas and inputs provided. Always verify important calculations independently. NovaCalculator processes calculator inputs client-side; optional analytics follow visitor consent settings. © 2024–2026 NovaCalculator.

Share this calculator

Formula

H = atan2(sqrt(3)(G-B), 2R-G-B) | S(HSL) = delta/(1-|2L-1|) | L = (max+min)/2

Where R, G, B are normalized to 0-1 range, max and min are the largest and smallest RGB components, delta is max minus min. Hue is computed from the dominant channel and mapped to 0-360 degrees. HSL Saturation depends on lightness, while HSV Saturation equals delta divided by max. HSV Value equals max directly.

Worked Examples

Example 1: Converting Google Blue to HSL and HSV

Problem: Google uses the brand color #4285F4 (RGB 66, 133, 244). Convert this to HSL and HSV color spaces.

Solution: Normalize RGB: R=0.259, G=0.522, B=0.957\nMax=0.957 (B), Min=0.259 (R), Delta=0.698\nHue = ((0.259 - 0.522) / 0.698 + 4) x 60 = 217 degrees\nHSL: S = 0.698 / (1 - |2x0.608 - 1|) = 0.698 / 0.784 = 89%\n L = (0.957 + 0.259) / 2 = 61%\nHSV: S = 0.698 / 0.957 = 73%, V = 96%\nCMYK: C=73%, M=45%, Y=0%, K=4%

Result: HSL(217, 89%, 61%) | HSV(217, 73%, 96%) | CMYK(73%, 45%, 0%, 4%) | Complementary: #F4C342

Example 2: Checking Accessibility of Text Color

Problem: A designer wants to use #6B7280 (gray-500) text on a white background. Does it meet WCAG AA standards?

Solution: RGB: R=107, G=114, B=128\nRelative luminance: 0.2126 x 0.137 + 0.7152 x 0.155 + 0.0722 x 0.199 = 0.154\nContrast with white: (1 + 0.05) / (0.154 + 0.05) = 1.05 / 0.204 = 5.14:1\nWCAG AA normal text (4.5:1): PASS\nWCAG AA large text (3:1): PASS\nWCAG AAA normal text (7:1): FAIL

Result: Contrast ratio 5.14:1 passes WCAG AA for both normal and large text, but fails AAA. For AAA compliance, darken to #4B5563 (gray-600).

Frequently Asked Questions

What is the difference between RGB, HSL, and HSV color models?

RGB (Red, Green, Blue) is an additive color model used in screens and digital displays where colors are created by combining red, green, and blue light at different intensities from 0 to 255. HSL (Hue, Saturation, Lightness) describes colors using a color wheel angle (0-360 degrees), saturation percentage (how vivid the color is), and lightness percentage (how bright or dark). HSV (Hue, Saturation, Value) is similar to HSL but uses Value instead of Lightness, where Value represents the brightness of the color. HSL and HSV are more intuitive for humans because they separate the color identity (hue) from its intensity and brightness, making it easier to create color variations by adjusting individual components independently.

How is the hex color code derived from RGB values?

A hex color code is a six-character representation of an RGB color where each pair of characters represents the red, green, and blue channels in hexadecimal (base-16) notation. Each channel ranges from 00 (decimal 0) to FF (decimal 255). For example, pure red is #FF0000 because red is at maximum (FF = 255), while green and blue are at zero (00 = 0). The hex code #4285F4 breaks down to R=66 (42 hex), G=133 (85 hex), B=244 (F4 hex). Hex codes are the most common color format in web development because they are compact and widely supported in CSS, HTML, and design tools. The pound sign prefix is conventional but not always required depending on the context.

What is CMYK and how does it relate to RGB?

CMYK (Cyan, Magenta, Yellow, Key/Black) is a subtractive color model used in printing where colors are created by absorbing light rather than emitting it. While RGB adds light to create colors on screens, CMYK removes light by applying ink on paper. Converting between RGB and CMYK involves mathematical transformations, but the conversion is not perfect because the two models have different color gamuts. RGB can display some vivid colors that CMYK cannot reproduce in print, particularly bright blues and greens. When designing for print, always work in CMYK or verify your colors convert acceptably. The Key component (K) represents black ink, which is used instead of combining maximum cyan, magenta, and yellow because pure black from CMY mixing is imperfect and wastes expensive colored ink.

How do I create color variations using HSL?

HSL makes creating color variations intuitive because each component controls a different aspect of the color. To create lighter or darker shades of the same color, keep the hue and saturation constant and adjust the lightness value. Lightness of 50% gives the pure color, lower values create darker shades approaching black, and higher values create lighter tints approaching white. To create muted or pastel versions, reduce the saturation while keeping hue and lightness the same. A saturation of 100% gives the most vivid color, while 0% produces a pure gray. To create analogous color schemes, keep saturation and lightness constant and shift the hue by 15-30 degrees in either direction. This approach is far more intuitive than trying to manipulate RGB values directly.

What is the difference between HSV and HSB color models?

HSV (Hue, Saturation, Value) and HSB (Hue, Saturation, Brightness) are identical color models with different names. The V in HSV and B in HSB refer to the same measurement. Adobe products typically use HSB terminology while most programming libraries and technical documentation use HSV. Both define colors on a cone-shaped model where the top circular face represents full brightness with varying hue and saturation, and the point at the bottom represents black. HSV/HSB differs from HSL in how it handles brightness. In HSV, a value of 100% means the color is at full brightness, while in HSL, a lightness of 100% always produces white regardless of hue and saturation. HSL 50% lightness gives the purest color, while HSV 100% value gives the brightest version of that color at the current saturation.

Does Rgb Hsl Hsv Converter work offline?

Once the page is loaded, the calculation logic runs entirely in your browser. If you have already opened the page, most calculators will continue to work even if your internet connection is lost, since no server requests are needed for computation.

References

Reviewed by Daniel Agrici, Founder & Lead Developer · Editorial policy