Add palette creation to ui object
Revert printf to 32 bit Linux specifiers