Fix color spacing

RGB values run from 0 to 255, so when converting to/from a 0..1 range, it should be divided/multiplied by 255, so that a true red value (255) becomes 1.

The `% 256` is still correct, however it might be better to do a `min(255, $variable)` instead, so that the color components don't wrap around.