optimize the 16 color BG palette mode