Enter the red, green, and blue values into the calculator to determine the hue angle (note: hue is undefined for neutral/grayscale colors where R = G = B).

Hue Angle Calculator

RGB Hue Solver
Hue Difference

Enter any 3 values to calculate the missing value (when the solution is unique)

Hue Angle Formula

The following formula is used to calculate the hue angle from RGB values (quadrant-aware, using atan2), mapped to the range 0 to 360 degrees.

H=\left(\operatorname{atan2}\left(\sqrt{3}\,(G-B),\,2R-G-B\right)\cdot\frac{180}{\pi}+360\right)\bmod 360

Variables:

  • H is the hue angle in degrees (0 to 360)
  • R is the red value (use the same scale for R, G, and B, e.g., 0 to 255 or 0 to 1)
  • G is the green value (same scale as R and B)
  • B is the blue value (same scale as R and G)

This formula derives from the opponent-color model, where the two chrominance axes are a = 2R – G – B (red vs. cyan) and b = sqrt(3)(G – B) (yellow vs. blue). The atan2 function resolves the correct quadrant automatically, producing an angle that spans the full 360-degree circle without requiring manual quadrant adjustments.

What is a Hue Angle?

A hue angle is a numerical representation of color identity expressed as a position on a 360-degree color wheel. It isolates the color family (red, orange, yellow, green, cyan, blue, violet, magenta) from brightness and saturation, making it possible to describe any chromatic color with a single angular value. The concept originates from the CIE (Commission Internationale de l’Eclairage) color appearance models and is now used across HSV, HSL, HSI, CIELAB (L*a*b*), and CIELUV (L*u*v*) color spaces.

In the sRGB/HSV color wheel, the primary and secondary colors are evenly spaced at 60-degree intervals: red sits at 0 degrees, yellow at 60, green at 120, cyan at 180, blue at 240, and magenta at 300. Any color between two anchor points carries a hue angle proportional to its position. For fully saturated colors, each 1-degree shift corresponds to approximately a 4.25-unit change in one RGB channel (on the 0 to 255 scale). Hue is undefined for achromatic colors (pure white, black, or gray) because R = G = B leaves no dominant wavelength.

Color Wheel Hue Angle Reference Table

The table below lists the hue angle, RGB values (0 to 255 scale), hex code, and approximate color name for every 30-degree increment around the sRGB color wheel. All entries are at full saturation and maximum value (HSV S = 100%, V = 100%).

Hue AngleRGBHexColor Name
025500#FF0000Red
302551280#FF8000Orange
602552550#FFFF00Yellow
901282550#80FF00Chartreuse
12002550#00FF00Green
1500255128#00FF80Spring Green
1800255255#00FFFFCyan
2100128255#0080FFAzure
24000255#0000FFBlue
2701280255#8000FFViolet
3002550255#FF00FFMagenta
3302550128#FF0080Rose
36025500#FF0000Red (wraps)

Hue Angle Across Color Spaces

The calculator above computes the RGB opponent-color hue, but hue angle exists in several distinct color models. Each model calculates hue differently, and the resulting degree values for the same visual color can differ depending on the space.

HSV and HSL (Hexagonal Models)

HSV (Hue, Saturation, Value) and HSL (Hue, Saturation, Lightness) both compute hue by first identifying which RGB component is the maximum and minimum, then applying a piecewise formula based on the ordering of R, G, and B. The resulting hue is identical in both models because only the saturation and brightness/lightness definitions differ. These models were introduced in the mid-1970s for interactive color selection in computer graphics and remain the basis for nearly every color picker in modern design software.

CIELAB (L*a*b*) and CIELCh

In the CIELAB color space, hue angle is calculated from the a* and b* opponent-color coordinates as h_ab = atan2(b*, a*). The a* axis runs from green (negative) to red (positive), and the b* axis runs from blue (negative) to yellow (positive). Red corresponds to approximately 0 degrees, yellow to approximately 90, green to approximately 180, and blue to approximately 270. The cylindrical form of CIELAB is called CIELCh, where L* is lightness, C* is chroma (saturation intensity), and h is the hue angle. CIELAB hue angles are designed to be perceptually uniform, meaning equal angular differences correspond to roughly equal perceived color differences. This property makes CIELAB hue the preferred metric in industries where color accuracy has direct commercial impact.

CIELUV (L*u*v*)

CIELUV defines hue angle similarly to CIELAB but uses the u* and v* coordinates: h_uv = atan2(v*, u*). The CIE adopted CIELAB and CIELUV simultaneously in 1976 because neither could achieve consensus as the sole perceptual color space. In practice, CIELUV is favored for applications involving additive color mixing (such as television and LED lighting) because its chromaticity diagram produces straight-line additive mixtures, while CIELAB is more common in subtractive color industries like printing and paint.

Hue Angle Comparison Across Color Spaces

The table below compares the approximate hue angle values for common colors across RGB/HSV, CIELAB, and CIELUV. These values illustrate how the same perceived color maps to different angular positions depending on the color model. CIELAB and CIELUV values are approximate because they depend on the illuminant (D65 assumed here).

ColorRGB/HSV HueCIELAB h_ab (approx.)CIELUV h_uv (approx.)
Red (255, 0, 0)04012
Yellow (255, 255, 0)6010285
Green (0, 255, 0)120136128
Cyan (0, 255, 255)180197192
Blue (0, 0, 255)240306266
Magenta (255, 0, 255)300328316

RGB/HSV hue is perfectly linear (60-degree spacing between primaries and secondaries), while CIELAB and CIELUV hue angles are nonlinearly distributed. This nonlinearity reflects human color perception: our eyes are more sensitive to differences in certain spectral regions than others. For example, sRGB red at 0 degrees maps to roughly 40 degrees in CIELAB because the Lab space compresses the red-to-yellow perceptual range relative to RGB.

Complementary Colors and Hue Angle Arithmetic

The 360-degree circular structure of hue enables straightforward color harmony calculations. A complementary color sits exactly 180 degrees opposite on the wheel: if a color has a hue of 30 degrees (orange), its complement is at 210 degrees (azure). Split-complementary schemes use the two colors at +150 and -150 degrees from the base. Triadic schemes space three colors at 120-degree intervals, and tetradic (square) schemes use four colors at 90-degree intervals. These relationships hold in any hue-based color model, though the visual results depend on whether you are working in perceptually uniform spaces (CIELAB) or device-dependent spaces (sRGB/HSV).

Hue Angle in Food Science and Quality Control

Outside of digital color theory, hue angle is one of the most widely used metrics in food science for quantifying color changes during ripening, cooking, and storage. Researchers measure hue angle using colorimeters or spectrophotometers in the CIELAB space, where it directly tracks the transition from one color family to another as a biological or chemical process unfolds.

In tomato ripening studies, the hue angle drops from roughly 110 degrees (yellow-green, immature) to approximately 35 degrees (red, fully ripe) as lycopene accumulates and chlorophyll degrades. This predictable trajectory allows packing houses to sort tomatoes by hue angle rather than relying solely on subjective visual grading. Similarly, in table grape research, hue angle values have been recorded declining from about 83 (yellow-green skin) down to approximately 14 (deep purplish-red) during veraison and full maturity, a shift that correlates tightly with anthocyanin concentration and total soluble solids.

Banana ripeness is another well-documented case: the fruit’s hue angle transitions from roughly 100 degrees (green peel, high starch) through 85 to 90 degrees (yellow, commercial sale stage) and eventually below 70 degrees (brown-spotted, overripe). Olive oil quality assessment relies on hue angle to distinguish between green-gold oils (high chlorophyll, hue near 100 to 105 degrees) and yellow oils (carotenoid-dominant, hue closer to 85 to 90 degrees). In meat science, fresh beef typically registers a hue angle near 35 to 40 degrees (bright cherry red), and deviations above 50 degrees indicate metmyoglobin formation and surface browning.

Typical Hue Angle Ranges for Common Foods (CIELAB)

The table below summarizes published hue angle ranges measured in the CIELAB color space for various food products at different quality stages. All values assume a D65 illuminant and 10-degree standard observer.

Food ProductStage / ConditionHue Angle Range (h_ab)
TomatoMature green105 to 115
TomatoTurning / breaker60 to 80
TomatoFully ripe30 to 40
BananaGreen (stage 1 to 2)95 to 105
BananaRipe yellow (stage 5 to 6)80 to 90
BananaOverripe / spotted60 to 75
Table grape (red variety)Veraison onset70 to 85
Table grape (red variety)Fully ripe10 to 25
Fresh beefBright cherry-red (oxymyoglobin)30 to 42
Fresh beefBrown surface (metmyoglobin)48 to 65
Extra-virgin olive oilGreen-gold (chlorophyll-rich)98 to 108
Extra-virgin olive oilYellow (carotenoid-dominant)83 to 92
Orange juiceFresh-squeezed70 to 80
Wheat flourStandard white88 to 95

Hue Angle in Computer Vision and Image Processing

Hue-based color models became central to computer vision beginning in the late 1970s because separating hue from brightness makes object segmentation far more robust under varying lighting conditions. When a camera views an apple on a conveyor belt, the brightness of the apple’s surface changes depending on the overhead lamp angle, but the hue remains relatively stable. Segmenting by hue angle rather than raw RGB dramatically reduces false boundaries caused by shadows and specular highlights.

In autonomous vehicle research, hue thresholding is used to detect traffic signals: red signals cluster near 0 degrees and 350 to 360 degrees, green signals near 120 to 140 degrees, and amber signals near 30 to 50 degrees. Medical imaging applies hue segmentation to distinguish tissue types in histology slides, where stained cell nuclei occupy a hue band (roughly 220 to 260 degrees in hematoxylin staining) distinct from cytoplasm (300 to 340 degrees in eosin). Agricultural drone imagery uses hue angle to classify crop health, with healthy chlorophyll-rich vegetation mapping to the green hue band (90 to 150 degrees) and stressed or senescent foliage shifting toward yellow (60 to 90 degrees).

Hue Angle in Printing and Color Grading

In offset and digital printing, hue angle measurements from spectrophotometers serve as the primary quality metric for press calibration. A pressman might target a Pantone spot color with a specific CIELAB hue angle and chroma, then adjust ink film thickness and dot gain until the printed sheet falls within a tolerance of plus or minus 2 degrees. The ISO 12647 standard for process printing defines acceptable hue variation for each process ink (CMYK), and all major press certification programs (G7, PSO, Fogra) reference hue angle tolerances when evaluating print fidelity.

In video post-production, color grading tools (such as the vectorscope in DaVinci Resolve, Adobe Premiere, and Avid Media Composer) display hue angle as a radial position on a circular scope. Colorists shift hue angles to create mood: a teal and orange grade pushes shadow hues toward 180 to 200 degrees (teal) and highlight hues toward 25 to 40 degrees (warm orange). Hue-versus-hue curves allow selective rotation of one hue range while leaving others untouched, an operation that is only coherent because hue is an angular, circular quantity.

Quadrant Handling and Edge Cases

A common source of error in hue angle computation is incorrect quadrant resolution. The basic arctan(b/a) function only returns values in the range of -90 to +90 degrees, which covers only two of the four quadrants. To recover the full 0 to 360 degree range, you must either use the atan2(b, a) function (which most programming languages and calculators provide) or manually add offsets: add 180 degrees when a is negative, and add 360 degrees when the result is negative. McLellan et al. (1995) formalized this for CIELAB data in their influential paper on multi-quadrant Hunter L,a,b hue calculations.

Several edge cases produce undefined or degenerate hue values. When R = G = B (any shade of gray, including black and white), both chrominance axes equal zero and the atan2 function returns 0 by convention, but the result carries no meaningful color information. When solving the inverse problem (computing one RGB channel from a known hue and two other channels), certain hue angles create singularities: at 0 and 180 degrees, red cannot be uniquely determined from green and blue alone; at 60 and 240 degrees, blue becomes indeterminate; and at 120 and 300 degrees, green becomes indeterminate. The calculator above handles these cases by alerting the user when a unique solution does not exist.