The ::selection pseudo-element controls what color appears when a visitor highlights text on your site. By default it's the browser's blue, but you can match it to your brand palette.
Keep the contrast between background and text color high for accessibility. A subtle brand color at partial opacity works well without making selected text unreadable.
::selection {
background: #e74c3c;
color: #ffffff;
}
::-moz-selection {
background: #e74c3c;
color: #ffffff;
}Generate this with our Color Palette toolTry it free →
