Magento 2.1 – How to Change Button Color to Custom Color

less-cssmagento-2.1

I've tried to define a custom color in my custom less stylesheet in my theme css/source folder and pulling it in with _styles.less but it doesn't seem to work although it is seeing the custom text styles defined in my custom less.
But, my custom color remains undefined when I deploy it. Do I define it in _theme.less? that didn't seem right as it appears to be for altering Magento variables that have already been defined.
Do I add it to the list in the _color.less file in my lib?

Best Answer

You have to override variable value in your custom theme _theme.less file as below:

@button__color: red;
@button__background: yellow;

If you did,t configure compilation then refer this How to configure css compilation?

- php bin/magento cache:clean
Related Topic