RGB to HSB Calculator

This form will transform RGB values to HSB values.   It is intended to be used with Photoshop Camera Raw calibration steps, a Macbeth Color Checker, and a digital image of the Macbeth squares.

The objective of this RGB to HSB transform is to assist the user with determining whether hue or saturation needs the most correction during ACR calibration.   Since the color metrics are all interrelated, it is useful to be able to evaluate hue, saturation, and brilliance as one adjusts the ACR calibration hue and saturation sliders.   Since the ACR dialogue is modal one cannot us the Photoshop "info" pallet for help.   If and when ACR shows color values in both RGB and HSB, this page will be unnecessary.

Enter your RGB values from your image and they will be converted to HSB.   If you pick a patch or color name from the Macbeth target area, the corresponding RGB values will be inserted.   Each time a new set of RGB values is detected, the corresponding HSB values and the corresponding color patch will be updated.   Note that the visible sample patch colors are based on hexadecimal HTML codes and do not represent any particular ICC or CIE color space.   They may not visually match your image or your target.   The differences between the image and target values are also shown simply for convenience.

ACR Camera Image 
Differences Relative to Target 

Macbeth Target Values 
Target Color Name Target Color Profile  

The patch number and color name above may be used to select target RGB values.   The default RGB patch values are based on a Macbeth Color Checker target image in CIE Lab mode.   This was converted to each of the supported Color Profiles.   The resulting Photoshop CS RGB values were then used to populate these defaults.   The "Macbeth CC HiSat" defaults are from the Macbeth Color Checker chart and do not represent any color space.   The default target profile is Adobe RGB (1998).   Also, you may simply enter your own target RGB values.

The RGB to HSB calculations are straightforward.   The B value (brilliance or luminescence) is the maximum value divided by 255.   The S value (saturation) is the difference between the maximum and minimum values divided by the maximum value.   The H value (hue) is the difference between the two lowest values divided by the maximum value and expressed in degrees (0-360).   Some clever folks can quickly do these calculations in their head.   I'm not one of them, hence the effort to create this on-line calculator.   I have validated these results against Adobe Photoshop CS.   That's good enough for me.   All calculations are done with in-line javascript and work with Netscape or Internet Explorer.   Feel free to download/copy the HTML if you want to change the target defaults.

This color wheel is provided as a simple visual guide to the relationships between the primary hue values.      

Using the ACR calibratino sliders, note that changing saturation changes the relationship between the minimum and maximum values.   Changing the hue changes the relationship between the maximum and both of the other values.   All changes affect all values in all patches.   In other words, if its not broke, donít fix it.   Don't expect to achieve 100% correlation of all numbers in all patches.

Some other color calculators:
Bruce Lindbloom's Color Calculator
Color Conversion Algorithms

I hope you find this trivial calculator useful.   In addition to its utility function assisting with Adobe camera raw calibration, you might find it useful as an aid in understanding the relationship between RGB values and the hue, saturation, and brilliance of color tones.   You can download the MS Excel Spreadsheet I used to summarize the image and target values from this link:   AcrCalibrate.xls   If you have any comments, or suggestions, I would welcome your input.   Please send me an  Email

Rags Gardner
Rags Int., Inc.
204 Trailwood Drive
Euless, TX 76039
(817) 267-2554
Send Email
August 9, 2004

This page last updated on: Thursday April 12 2007
You are visitor number 61,978 since 08/23/04