# Brand Color for Text Selection

> Changes the highlight color when visitors select text on your site to match your brand.

- Type: CSS
- Runs: Site-wide header
- Category: [Frontend & Design](https://wpide.com/library/category/frontend/)
- Tags: css, branding, design
- Author: WPIDE Team
- Installs: 0
- Updated: 2026-10-28
- Page: https://wpide.com/library/frontend-selection-color/

## Code

```css
::selection {
    background: #2271b1;
    color: #ffffff;
}
```

## Notes

Change the two colors. Keep enough contrast between background and text.

## How to use it

Install the free WPIDE plugin (https://wordpress.org/plugins/wpide/), find "Brand Color for Text Selection" in its snippet library and add it in one click; or create a new CSS snippet in WPIDE (or any code snippets plugin) and paste the code above. More snippets: https://wpide.com/library/
