Dynamic payment buttons: Change color of Buy Now button

When using Shopify's Dynamic Payment Buttons, the Buy Now button can be modified to match your theme look with this code change.

Original:

Result:

Using the theme's Accent color setting:

How to:

Edit assets/style.scss.liquid:

Click to open assets/style.scss.liquid

Add the following code to the very bottom of the file, make a couple blank lines and then add on a new line:

/*================ Force an input/button to look like a text link ================*/
.text-link {
  display: inline;
  border: 0 none;
  background: none;
  padding: 0;
  margin: 0;
}
.shopify-product-form{
  max-width: 400px;
  margin: 0 auto;
}
.shopify-payment-button .shopify-payment-button__button {
  margin-top: 15px;
  border-radius: $radius;
  overflow: hidden;
}

.variant--soldout .shopify-payment-button,
.variant--unavailabe .shopify-payment-button{
  opacity: 0;
}
.shopify-payment-button{
  transition: opacity 0.4s ease-out;
}

.shopify-payment-button .shopify-payment-button__button--unbranded{
  padding: 16px 20px;
  font-family:  $accentFontStack;
  text-transform: uppercase;
  background-color: $colorSplash;
  font-size: 14px;
  font-weight: normal;
  letter-spacing: 1px;
  @include prefix('user-select', 'none');
  -webkit-appearance: none;
  -moz-appearance: none;
  &:hover:not([disabled]){
    background-color: darken($colorSplash, 10%);
  }
  &:active,
  &:focus {
    background-color: darken($colorSplash, 12%);
    outline: none;
  }
}
.shopify-payment-button .shopify-payment-button__more-options{
  &:active{
    text-decoration: underline;
    outline: none;
    transform: translateY(1px);
  }
}

/* - end - */

Save the file.


Use a different button color

If you'd like to override the accent color and use a different color, add this code after the above.

/* -- code to change dynamic payment buy now button color -- */
.shopify-payment-button__button--unbranded { 
  background-color: #111111 !important; }
/* - end - */

Save the file.

Use an valid hex color code for your custom button color:

http://www.colorhexa.com/web-safe-colors


How to turn off the default PayPal button

If you'd like to remove the PayPal button and replace with the above Buy Now button, you'll need to deactivate PayPay's express checkout option.

Open your Shopify Payment Settings:

https://myshopify.com/admin/settings/payments

Deactivate that: