added palette function, currently white -> yellow -> red