I agree it's pretty repetitive... I have taken a look at simplifying by using lookup tables... there are 66 megacolour and 384 seg colour entries... It could easily be made in a super loop and two inner loops... However, it's a task that would take me too long to convert.... I would sooner do this in C... It would be simpler but a smidge slower!!