Home > Docs > GDPR Cookie Consent > Altering the Color of the Toggle Button on the Cookie Consent Popup

Altering the Color of the Toggle Button on the Cookie Consent Popup

Last updated on June 14, 2023

The GDPR Cookie Consent Plugin gives the users granular control over the cookies that they want to allow. This is made possible with a popup that appears when clicked on the Settings button. From this popup, the users can enable or disable the cookies based on their categories using a toggle button.

The toggle buttons by default have teal color. The following code snippet allows you to add the color of the toggle button on the Settings popup from the default color. Simply add the following code snippet to the style.css file of the active theme and replace the hex code of the property background-color with the hex code of the custom color.

.cli-switch input:checked + .cli-slider{
   background-color:#f78f00;  
}