<p>why do:</p><p>for(int i=0;i<256;i++){<br /> upload_color(i,palette[i]);<br />}</p><p>when you can do</p><p>upload_color(0,palette[0]);<br />upload_color(1,palette[1]);<br />upload_color(2,palette[2]);<br />upload_color(3,palette[3]);<br />upload_color(4,palette[4]);<br />upload_color(5,palette[5]);</p><p>and just repeat 251 more times</p>