Color examples

Hello,
I want an EMA or SMA that displays one color trending down and another color when trending up. Is there an example on the forum?
Thanks.