Color swatches on product page now showing

Topic summary

A user encountered an issue where only 2 out of 12 color swatches were displaying on their product page.

Root Cause:
The color variant names were written in Danish, but the theme’s CSS only recognizes English color names for generating background colors automatically.

Solution Provided:
GemPages support suggested adding custom CSS code to map Danish color names to their corresponding color values:

  • Navigate to Online Store → Theme → Edit code
  • Open the theme.liquid file
  • Insert CSS code before the closing </body> tag to define background colors for each Danish color variant

The user successfully implemented this fix and confirmed it worked. However, they later reported the solution wasn’t working for another product, suggesting the issue may be ongoing or product-specific.

Summarized with AI on November 16. AI used: claude-sonnet-4-5-20250929.

hello,

I have added a product on my page with 12 color options. However, it seems only two colors are showing.

Can anyone advise how to fix this? See example only two colors are showing:

URL: https://mctasker.dk/collections/mc-tilbehor/products/maske-bandana

@ddcu

Hello

You have not spelled your color correctly in the color swatch.
Due to this browser is not able to understand the exact color name

for example

bla

gul

lilla

1 Like

thanks, my site is in danish and I would like to keep the colors in danish. Any chance I can do that or I need to use english naming convention?

Also I have some productypes which dont really have a color but rather a print.

Hello @ddcu

Your theme automatically gets the CSS background color in English
but you set the variant in danish so it doesn’t work

I have 1 solution, you can add the corresponding color CSS for each danish color code:

  1. Go to Online Store-> Theme-> Edit code

  2. Open your theme.liquid theme file

  3. Paste the below code before :


I tried and it worked:

The remaining 4 variants are not color names so there is no CSS code to add a background color

Hope my solution can work and support you!

Kind & Best regards!

GemPages Support Team

1 Like

amazing thanks much appreciated! :grinning_face:

1 Like

I am glad that my solution is helpful to you :grin: .

would you know why it is not showing on this product here?