May i know how to set the background of a selected text to another color?

This is same as highlighting the text.
Thanks