Background Color of by now button

Hey there, I want to change background Color of “Buy it now” button to black Color. Please help me to change the yellow colour to black Color. I also want to mention that everyone button on my page is yellow, Like “add to cart button” “Buy now button”. I want to change these buttons background Color to black.

My website: www.azadifit.com

Hi Raja,

To change the background color of all buttons, follow these steps:

  1. Go to the theme customizer.
  2. Navigate to Theme Settings > Colors.
  3. Look for the Button Background Color option.

In the latest themes, you may find a Color Scheme section instead, where you can make the adjustments.

Please write a code for this.

You can add this css code in your base.css file

button.button–primary {
background-color: #000;
color: #fff;
–buttons-border-width: unset;
}

Hi @raja18181 ,

Please go to Actions > Edit code > Assets > base.css file and paste this at the bottom of the file:

.shopify-payment-button__button {
    background: #000 !important;
    color: #fff;
}
.shopify-payment-button__button--unbranded:after {
    --color-button: 18, 18, 18;
}

Ok it worked. Now how can I add buy it now text on it because it makes the whole area black as you can see in the attached picture. Please write a code to solve this.

Hi @raja18181

Check this one.

From you Admin page, go to Online Store > Themes

Select the theme you want to edit

Under the Asset folder, open the main.css(base.css, style.css or theme.css)

Then place the code below at the very bottom of the file.

.shopify-payment-button__button--unbranded {
    background: black !important;
    color: white;
}

And save.

Result:

Please don’t forget to Like and Mark Solution to the post that helped you. Thanks!

Hi @raja18181 ,

Please change code:

.shopify-payment-button__button {
    background: #000 !important;
    color: #fff !important;
}
.shopify-payment-button__button--unbranded:after {
    --color-button: 18, 18, 18;
}