Hue-controllable RGB LED lamp

As you partially guessed, map() takes an amount and the range of values to which it belongs, and remaps it to another range of values. I think the documentation page on it is very clear :

http://www.arduino.cc/en/Reference/Map