Skip to content
ZeroServer.tools

RGB to HSB Converter

Convert RGB (red, green, blue) color values to HSB / HSV (hue, saturation, brightness).

RGB Color: 99, 102, 241HEX Preview: #6366f1HSB Result: 239°, 59%, 95%
Presets:
#6366f1
Red
Green
Blue
HSB / HSV Output
Hue
239°
Saturation
59%
Brightness
95%
hsb(239, 59%, 95%)

RGB to HSB / HSV conversion

HSB (Hue, Saturation, Brightness) — also called HSV (Hue, Saturation, Value) — is a cylindrical color model that matches how designers intuitively think about color. Hue is the angle on the wheel (0°–360°), saturation is how vivid the color is (0% = grey, 100% = pure), and brightness/value is how light or dark it is (0% = black, 100% = full color). Compare with HSL (Lightness), where 50% is the pure color and 100% is white. For the reverse conversion use HSB to RGB, or see Color Converter for all formats at once.

Built and maintained by Meet Shah · Last updated

What this tool is used for

  • Converting RGB channels into the model a design tool uses.
  • Getting HSB values to hand to someone working in an image editor.
  • Understanding a colour's hue and brightness from its channels.
  • Comparing two RGB colours by brightness.
  • Producing HSB from a picked colour for a design handoff.

Frequently Asked Questions

How is hue recovered from RGB?
From which channel is the maximum. If red is largest the hue is in the red sector and is computed from the green-minus-blue difference; green and blue give the other two sectors offset by 120° and 240°. The difference is divided by the chroma — max minus min — to place it within the sector.
How do brightness and saturation come out?
Brightness is simply the maximum channel divided by 255. Saturation is the chroma divided by that maximum — so a colour is fully saturated when its minimum channel is zero, regardless of how bright it is.
Why is the hue undefined for greys?
Because max and min are equal, chroma is zero, and the formula divides by it. Every implementation reports 0 by convention. That means a round trip through HSB does not preserve a grey's original hue — there was none to preserve.
Does the conversion lose information?
Not for a single colour — it is exactly invertible in continuous arithmetic. What loses information is rounding: storing hue as a whole number of degrees quantises the circle into 360 steps, so a round trip can shift a saturated colour by a value or two per channel.
Why is HSB better than HSL for a colour picker?
Because its brightness axis maps onto the picker's vertical dimension naturally — top is the pure hue, bottom is black. In HSL the pure hue sits in the middle at 50% lightness with white above it, which makes the same square harder to navigate for the common task of darkening a colour.

Common errors and gotchas

  • Assuming HSB and HSL saturation mean the same thing, which they do not.
  • Expecting to paste HSB into CSS, which has no such function.
  • Treating a grey's hue as meaningful, when saturation zero makes it arbitrary.
  • Round-tripping repeatedly through 8-bit channels, accumulating error.
  • Losing alpha, which HSB as usually quoted cannot carry.

Related Design & CSS tools

Private & free — this tool runs entirely in your browser.

KinstaFast managed hosting — up to $500 + 10% recurring.affiliate