Color scheme setting outputting incorrectly

Short description of issue

Color scheme setting outputting incorrectly

Reproduction steps

N/A

Additional info

I’ve just come to work on a new site, which is using the theme Hyper (100% certain this isn’t a theme issue).

I’ve noticed that the selected color scheme in the section settings is not outputting the correct value in liquid.

For example I’ve tried the following just to output the value:

<h3>section.settings.color_scheme: {{ section.settings.color_scheme }}</h3>

In the customiser, on the section I currently have ‘Scheme 5’ selected, yet the following is output on the front-end:

section.settings.color_scheme: scheme-3

I then tried selecting Scheme 4 in the customiser, this resulted in:

section.settings.color_scheme: scheme-2

This is directly from the section settings and theres nothing else interfering with it so it definitely isn’t a theme issue.

But something very odd, the styles/colors coming from the selected color scheme setting in the section settings are showing correctly which makes this even more strange.

What type of topic is this

Bug report

Just to add some additional info as I hit a character limit, following this:

But something very odd, the styles/colors coming from the selected color scheme setting in the section settings are showing correctly which makes this even more strange.

So I have Scheme 5 applied to my section, its outputting the following as mentioned:

section.settings.color_scheme: scheme-3

But, when I change the colors of Scheme 5, its updating the section styling as expected, yet the section has .color-scheme-3 against it :thinking:

Having the same issue where colour schemes are offset by 1 for some reason.

Here i have colour scheme 14

Where in customizer my colour scheme 14 is purple and the orange one that is actually used, is color-scheme-15

We really need this, don’t we? haha

Right, very typical, I’ve figured out the issue here.

It appears how Shopify labels/names the color schemes in the customiser is index based (starting with 1), and that follows whats in the settings_data.json (above).

So in this case, scheme-3 is the 5th color scheme within this, so its labelled as ‘Scheme 5’ in the customiser but in-fact has an ID of scheme-3.

This is an awful experience IMHO and more the reason to address the below referenced post and allowing us to rename color schemes.

And just an FYI, even though the above has scheme-inverse and scheme-info, it does not display these in the customiser, those are simply referenced as ‘Scheme 2’ and ‘Scheme 3’ respectively.

This might be it but i am not convinced as in my case they are only offset by 1 and i have the same setup. So i firmly believe there is something else going on here, i just not got to the bottom of it yet