void setup() { } void loop() { convert1(129); convert2(129); convert3(129); } int convert1(int color_in) { return 4096 / ( 256 / color_in); } int convert2(int color_in) { return color_in << 4; } int convert3(int color_in) { return (int) (4096 / ( 256 / (float) color_in)); }