How To Create Color Swatches for Product Variants in Shopify (Dawn Theme) Post author:Ramzan Post published:September 26, 2021 Post category:Shopify Post comments:0 Comments Copy Below Code and replace with Line: 202, 203, 204 of Sections/main-product.liquid {% if product.variants[forloop.index0].metafields.color.values and option.name == 'Color' %} <label for="{{ section.id }}-{{ option.name }}-{{ forloop.index0 }}" style="background-color: {{product.variants[forloop.index0].metafields.color.values}}"> </label> {% else %} <label for="{{ section.id }}-{{ option.name }}-{{ forloop.index0 }}"> {{ value }} </label> {% endif %} Hire Me Try Shopify free for 14 days Start free trial Tags: color swatches, dawn theme, shopify Please Share This Share this content Opens in a new window Opens in a new window Opens in a new window Opens in a new window Opens in a new window Opens in a new window Opens in a new window Opens in a new window Opens in a new window Opens in a new window Opens in a new window Read more articles Previous PostHow to Make Buttons to Smart Button in Shopify ? Shows Colourful Bubbles on Hover. Next PostHow To Create FAQs Page for Shopify Theme Dawn | Creating Accordions in Shopify Theme Development You Might Also Like Shopify PayPal Credit Debit Card Buttons | Debutify Theme | Smart Buttons Updated Code June 7, 2021 Dawn Theme – How To Remove Logo Only From Homepage? March 10, 2022 How To Add Back To Top Button to Scroll From Bottom On Shopify October 18, 2021 Leave a Reply Cancel replyCommentEnter your name or username to comment Enter your email address to comment Enter your website URL (optional) Save my name, email, and website in this browser for the next time I comment.