Take palette parameter into account