How a hue shift turns the colours of a picture
Painters and designers arrange colours on a wheel. Red sits at 0 degrees, yellow at 60, green at 120, cyan at 180, blue at 240 and magenta at 300, and then the wheel comes back to red. A colour's hue is its angle on that wheel. A hue shift turns every colour in the picture by the same angle, so the relations between colours stay the same while the colours themselves change.
This tool works in HSL: hue, saturation and lightness. Turning the hue there keeps the other two exactly, which has a simple meaning in red, green and blue: the largest and smallest channel of each pixel keep their values, and only the order and the middle value change. A rust colour of 200, 100, 50 turned 180 degrees becomes 50, 150, 200, a clear sky blue. A sky blue of 90, 150, 220 becomes 220, 160, 90, a warm sand. Orange, 255, 165, 0, turned 120 degrees becomes 0, 255, 165, a mint green.
There is another common way to do it, the matrix that CSS hue-rotate() uses. It keeps each pixel's brightness instead of its saturation. That sounds better, but strong colours do not survive it: pure red turned 180 degrees comes out about 0, 109, 109, a dull dark teal, and some colours are clipped at the edge of what a screen can show. For colour variants of a logo or icon, people usually expect the HSL result, where red's opposite is a bright cyan.
The presets cover the common jobs. Complementary, at 180 degrees, swaps each colour for its opposite: warm becomes cool and cool becomes warm. A third round, at 120 degrees, moves red to green, green to blue and blue to red; two thirds round, at 240 degrees, goes the other way. Nudge, at 30 degrees, is a small step that makes reds lean orange and blues lean purple, handy for a variant that still feels related to the original.
Know the limits before you use it on a photo. The whole picture turns, so faces, skies and grass change colour along with the thing you wanted to change. Greys, black and white never change, because they have no hue. Colours that differ only slightly can come out a step apart after rounding to whole numbers. Transparency is kept. A JPEG is saved again as JPEG at high quality, HEIC comes out as PNG, and the largest image the tool takes is 24 megapixels.