Skip to content

Convert RGB to HSV

Converting Red, Green, Blue (RGB) to Hue, Saturation, Value (HSV) is a precise, rule-based operation — both formats describe the same color with different numbers. Whether you are tuning a CSS custom property, matching a brand color across design tools, or preparing values for print, this page gives you an interactive converter, the exact RGB → HSV method, a worked example, a quick-reference table and the details that matter (rounding, gamut and print caveats).

From

To

—

—

—

Live preview

How to convert RGB to HSV

Take this real example — the color firebrick(#c2410c):

rgb(194, 65, 12) → hsv(17.47, 93.81%, 76.08%)

  1. Normalize R, G, B to 0–1; the value V is simply the largest channel.
  2. S = (max − min) / max (0 when max = 0).
  3. H follows the same hue-wheel rule as HSL. To invert: C = V·S, X = C·(1 − |((H/60) mod 2) − 1|), m = V − C, then the sector table.

V = max(R,G,B); S = (max − min) / max; H as in HSL

RGB to HSV conversion table

RGB to HSV — quick reference
Common colors converted from RGB to HSV
ColorRGBHSV
Whitergb(255, 255, 255)hsv(0, 0%, 100%)
Blackrgb(0, 0, 0)hsv(0, 0%, 0%)
Redrgb(255, 0, 0)hsv(0, 100%, 100%)
Limergb(0, 255, 0)hsv(120, 100%, 100%)
Bluergb(0, 0, 255)hsv(240, 100%, 100%)
VersatilBox accentrgb(194, 65, 12)hsv(17.47, 93.81%, 76.08%)
Tailwind blue-500rgb(59, 130, 246)hsv(217.22, 76.02%, 96.47%)
Tailwind emerald-500rgb(16, 185, 129)hsv(160.12, 91.35%, 72.55%)

About these formats

RGB (Red, Green, Blue). RGB is the additive model screens use: every color is a mix of red, green and blue light from 0 to 255 per channel. It is the numeric base all on-screen conversions pass through.

HSV (Hue, Saturation, Value). HSV is like HSL but with brightness ("value") instead of lightness — the model behind classic color pickers and graphics software (also called HSB). An industry convention, not a CSS space.

Frequently asked questions

How do I convert RGB to HSV?

Normalize R, G, B to 0–1; the value V is simply the largest channel. S = (max − min) / max (0 when max = 0). H follows the same hue-wheel rule as HSL. To invert: C = V·S, X = C·(1 − |((H/60) mod 2) − 1|), m = V − C, then the sector table. The converter above does it instantly, including the reverse direction.

What is RGB?

RGB — Red, Green, Blue — is the additive model screens use: every color is a mix of red, green and blue light from 0 to 255 per channel. It is the numeric base all on-screen conversions pass through.

What is HSV used for?

HSV (Hue, Saturation, Value) is like HSL but with brightness ("value") instead of lightness — the model behind classic color pickers and graphics software (also called HSB). An industry convention, not a CSS space.

Is the RGB → HSV conversion exact?

Yes. The formulas are deterministic and both formats store the same information for on-screen color; values are rounded only for display.

Why does the HSV value look different in other tools?

Small differences come from rounding (how many decimals are kept) and from out-of-gamut handling. This site follows the CSS Color 4 algorithms and shows OKLCH with 3 decimals, the same convention used by browsers and mainstream design tools.