HSV to RGB Converter

HSV to RGB: hsv(200, 60%, 90%) = rgb(92, 184, 230). See the formula worked step by step, a reference table, and our test of every HSV value.

How to use HSV to RGB

  1. 1Enter hue, saturation and value.
  2. 2Read red, green and blue.
  3. 3Check your library's hue scale (0–360, 0–1 or 0–255) before pasting numbers back.

Features

  • The conversion every colour picker runs
  • Pastel ring reference
  • Verified on all 3,672,360 whole-number inputs

How HSV to RGB conversion works

HSV to RGB is the conversion behind almost every colour picker: as you drag the handle, the picker turns its hue, saturation and value position into red, green and blue light for the screen.

  • Scale S and V to 0–1.
  • C = V × S (chroma), m = V − C.
  • X = C × (1 − |(H ÷ 60) mod 2 − 1|).
  • Choose (R′, G′, B′) from the hue's 60° sector.
  • R, G, B = round((value + m) × 255).

Worked example: hsv(200, 60%, 90%) to RGB

Here is the converter's own calculation for hsv(200, 60%, 90%), step by step. The result, rgb(92, 184, 230), is exactly what the tool above shows for this input.

  • Chroma C = 0.9 × 0.6 = 0.54.
  • X = 0.54 × (1 − |(200 ÷ 60) mod 2 − 1|) = 0.36.
  • m = 0.9 − 0.54 = 0.36.
  • 200° is in the 180–240° sector, so (R′, G′, B′) = (0, X, C) = (0, 0.36, 0.54).
  • Add m and multiply by 255: R = 92, G = 184, B = 230.
  • Written as rgb(92, 184, 230).

A pastel ring in HSV and RGB

Saturation 60% and value 90% held fixed, hue every 30°.

ColourHSVRGB
0°hsv(0, 60%, 90%)rgb(230, 92, 92)
30°hsv(30, 60%, 90%)rgb(230, 161, 92)
60°hsv(60, 60%, 90%)rgb(230, 230, 92)
90°hsv(90, 60%, 90%)rgb(161, 230, 92)
120°hsv(120, 60%, 90%)rgb(92, 230, 92)
150°hsv(150, 60%, 90%)rgb(92, 230, 161)
180°hsv(180, 60%, 90%)rgb(92, 230, 230)
210°hsv(210, 60%, 90%)rgb(92, 161, 230)
240°hsv(240, 60%, 90%)rgb(92, 92, 230)
270°hsv(270, 60%, 90%)rgb(161, 92, 230)
300°hsv(300, 60%, 90%)rgb(230, 92, 230)
330°hsv(330, 60%, 90%)rgb(230, 92, 161)

Precision test: every HSV value through the converter

All 3,672,360 whole-number HSV values convert to RGB and back to the same colour (100%), reaching 2,193,881 distinct RGB colours.

Method: every whole-number HSV value, through the converter's own code and back, compared on the 0–255 scale (how we test).

MeasureResult
HSV values tested3,672,360
Distinct RGB results2,193,881
Came back exactly100%
Largest change (0–255 levels)0
Average change0

Last updated · Source: Pixohub exhaustive test of lib/color-math.ts

Where you'll use HSV to RGB

Building your own colour picker

The HSV square is easy to draw, but the output has to be RGB for the screen and for any API. This is the conversion each pixel of a picker uses.

Pastel and muted palettes

Fixing S at around 60% and V at 90% and walking the hue gives soft, evenly bright colours, as in the ring below.

Embedded LEDs

LED animations often fade hue in HSV for smooth rainbow effects, then convert to RGB per frame for the driver. FastLED, for example, has its own CHSV type and hsv2rgb functions.

Common mistakes

  • Using hue in 0–1 (as many libraries do) with degree-based formulas.
  • Passing S and V as 0–255 (FastLED and OpenCV style) into a formula that expects 0–1.
  • Expecting equal V to look equally bright: yellow at V = 90% looks much lighter than blue at V = 90%.
  • Truncating instead of rounding the final values, which biases colours darker.

Frequently asked questions

What is hsv(200, 60%, 90%) in RGB?

rgb(92, 184, 230). V = 0.9 sets blue at 230, S = 0.6 drops red to 92, and the 200° hue places green at 184.

Why does FastLED give different RGB for the same HSV?

FastLED uses a 0–255 hue scale and a "rainbow" mapping that gives yellow more of the hue range, so its numbers don't match the standard formula used here.

Is the conversion exact?

Yes for whole-number input: the RGB result converts back to the same colour for every one of the 3,672,360 combinations we tested.

What range does H use?

0–360 degrees here. Many code libraries use 0–1 or 0–255 for hue; scale accordingly.

More text, code & dev tools