Curiosity has been working on Mars for almost 3 years. Every "sol" - a solar day on Mars that last just over 24 hours 39 minutes - information on the activities of the rover are sent back, including pictures from its hd colour Mastcam.
Most of the time, the images are of rocks. But for the first time, on sol 956 (April 15, 2015), Curiosity's Mastcam captured the Sun setting on Mars over Gale Crater. The sunset took almost 7 minutes.
The images came back in black and white. Taking a closer look, the image has a sort of hashed texture called Bayer matrix. This is how the Mastcam and all other digital cameras code colour into the images. This works in the same way the human eye does.
The Mastcam itself does not have the on-board software to interpret the colours from its images. Some of the Bayer data needs to be decoded on Earth in order to see the colours from the black and white images.
This is what the sunset looks like.