How can I set up color swatches on my custom product page?

Hello,

I need some help to figure out a few things on my product description page that was customized.

I would like to have the color swatches set like on this page, however using the same code I cannot get the same results:

(this is what I want) https://www.meriguet-carrere.com/collections/florence-bamberger/products/florens-verts-anglais

I ried on for this page and only one swatch is showing and I used the same exact code:

https://www.meriguet-carrere.com/products/brassee-de-pivoines-tendrement

Dimensions : rouleau de 10,05 m x 0,52 m, raccord : 52 cm.

COULEURS COORDONNÉES:

N°26 Tendrement
N°13 Perrine
MC46 Habit vert

Another point I am trying to remove the calculator and measurement that I underslined in yellow (see file attached).

Thanks in advance for your help.

Zina

Hi @Zina13 ,

Because the color code is added in the CSS according to the name of the product, so some products have not been declared, it won’t show the color.

If you want to show 2 colors here, please go to Assets > styles.scss.liquid and paste this at the bottom of the file:

.p_d_color.n°26tendrement:before {
    background: #a04b3f;
}
.p_d_color.n°13perrine:before {
    background: #DFCEAB;
}

Hope it helps!

Thank you so much for your help. Just one more question how do you code the color, ie #a04b3f?

Thanks again for your help.

Zina

Hi @Zina13 ,

I checked the product and used the tool to get the color code. You can use ‘colorzilla for chrome’

If it helped you solve your issue, please mark it as a solution. Thank you and good luck.