Category color selection should be allowed even when style is "none"

In category settings, I see the message “You can’t select colors because you have a category style of none.” However, it’s used by the Category Icons theme component, and that works quite nicely with “none” as the style.

My current work-around is to change the style setting, quickly set the category color, and quickly set it back. But that’s kind of silly. Please just allow it to be set (maybe with a note that it won’t change the color unless a theme does something with it, instead of hiding the setting). Thanks!

1 Like

In the Category Icons component, you can use a HEX color for the icon. The icon color defaults to the category badge color only when using the special keyword “categoryColor”. Is there any reason you can’t use a HEX value in the theme component’s settings?

1 Like

I find it much nicer to maintain and manage the category colors in the category setting rather than in the components setting list — so categoryColor is perfect. (And as noted, it actually works with “none” as the style, I’m just prevented from editing it.)

1 Like

It does indeed work, but I hesitate to amend core when style none is set for categories given that the colors in the category settings will only be used if this theme component is installed and each row in its settings is set to default to categoryColor. In other words, it’s a very specific use case.

Plus, the preview in the category edit screen in core doesn’t include the theme component’s icon, so when choosing a color the user wouldn’t see any changes in the preview.

1 Like

It could be this theme component or any other that does something with category color, right? For example Discourse Category Banners or Colorful categories component. So I think it’s not really that narrow of a use case. And those don’t all have the work-around of a configuration option for the theme component.

Oh, plus — I want to pick from the palette, and have the indicators show what’s taken already. That’s really nice! Can’t do that with the component hex color config.

1 Like