Color Sensing with TCS3200, Need Help with Code & Understanding

Not the frequency! The frequency doesn't get negative, does it? Have a look at this:

bcolor = map(frequency, 25,70,255,0);

If frequency is below 25, bcolor goes over 255. If frequency goes over 70, bcolor becomes negative. Don't mind what frequency is. Check only bcolor and set it to 0 or 255 if it went over the boundaries.