Change the Selected Text Color in CSS

It's now easy to change which color the selection will be using CSS. Go ahead and try selecting this very text, you'll see it's purple and the text itself goes white:

::-moz-selection {
  background-color: #EFBB35;
  color: #fff;
}

::selection {
  background-color: #EFBB35;
  color: #fff;
}

Limited properties

Only color, background, cursor and outline can be set for selections.

✖ Clear

🕵 Search Results

🔎 Searching...