One may argue about exact details of algorithm implementation in photoshop, but converting a color to HSV color space and shifting it in color by fixed value (linear filter), or by value depending on the color itself, is good approach to get effect you describe.