Instantly convert RGB to HSV with real-time color preview. Essential for designers, developers, and digital artists.
HSV Color Model: Hue (0°–360°), Saturation (0%–100%), Value (0%–100%). An intuitive representation of colors.
Conversion formula summary:
R', G', B' = R/255, G/255, B/255; Cmax = max(R',G',B'); Cmin = min(R',G',B'); Δ = Cmax - Cmin. Hue calculation depends on which channel is max. Saturation = Δ / Cmax (if Cmax>0) else 0. Value = Cmax.
RGB (Red, Green, Blue) is an additive color model used in displays. Each component ranges from 0 to 255. HSV (Hue, Saturation, Value) is a cylindrical representation that aligns more closely with human perception.
HSV Components:
Standard conversion from RGB to HSV (with R,G,B in [0,255]):
R' = R/255
G' = G/255
B' = B/255
Cmax = max(R', G', B')
Cmin = min(R', G', B')
Δ = Cmax - Cmin
// Hue calculation:
if Δ == 0: H = 0
else if Cmax == R': H = 60 * ((G' - B')/Δ mod 6)
else if Cmax == G': H = 60 * ((B' - R')/Δ + 2)
else if Cmax == B': H = 60 * ((R' - G')/Δ + 4)
// Saturation:
if Cmax == 0: S = 0
else: S = Δ / Cmax
// Value:
V = Cmax
// Convert H to degrees [0,360), S and V to percentages