Precompute color palette too.