Theme Habitat: How do I change background color on product cards?

When uploading a product with transparent background, the current color is black. Both on Collection page and on the Product page. Where can I change that?

Thank you so much in advance!

1 Like

Thank you for helping out! These steps is not available under Typography or Color options. Please see attachment.

Nothing under Color. Sorry, I am not a technical person.

Unpublished. Can I share link and code in a private message?

Hi @JimiT1

Please, share your store URL. Thanks!

Hello @JimiT1

The black background appears because Shopify automatically applies a default background color when a transparent image is uploaded.

How to Change the Background Color for Transparent Images:

Go to Shopify Admin → Online Store → Themes → Edit Code.

Open base.css (or theme.css) file under the Assets folder.

Add this CSS at the bottom:

.product__media img, .collection__image img {
background-color: white !important;
}

Thank you! This is the solution I am looking for. But under Assets folder I don’t have base.css or theme.css? Please see attached images.