MADS: Implement two palette functions