AstonJ
(AstonJ)
April 23, 2025, 3:49am
1
When you edit a category the field for text color is missing (there’s usually one for color and one for text_color).
1 Like
sam
(Sam Saffron)
April 23, 2025, 5:27am
2
@hugh / @lindsey could this be due to the refactor around allowing category icons?
2 Likes
Moin
April 23, 2025, 9:46am
4
It was removed in this PR
main
← remove-category-foreground-colors-from-ui
opened 10:56AM - 26 Mar 25 UTC
This change removes the foreground color category setting to simplify the catego… ry creation and edit process for admins.
Instead we determine the highest contrasting color (either white or black) based on the background color.
Contrast algorithm is based on:
https://www.w3.org/TR/AERT/#color-contrast
We also implement the value transformer as part of this change, which allows overriding the category text color.
Internal ref: /t/147046
The feature to choose the text color has been removed. Now Discourse automatically selects the color with better contrast.
But I had the same problem you have, and Meta has (for example, in the category banners of Support > WordPress , Theme component and Site feedback > Forum summaries ): on existing categories, this did not work. My texts were all white - even the ones on yellow. I saved the category settings again, and that fixed it. But it was quite annoying to check all categories and re-sa…
3 Likes
Can we consider restoring this setting, as the automatic functionality does not seem to be fulfilling its purpose?
1 Like
lindsey
(Lindsey Fogle)
April 23, 2025, 7:08pm
7
Hey folks, I’ve asked the engineer who worked on this feature to take a look to see if we can fix the issues with the automated text color so you don’t have to resave categories. We’ll be in touch with an update once we know more.
2 Likes
AstonJ
(AstonJ)
April 23, 2025, 7:21pm
8
Thanks Lindsey. Can you also ensure we have the option to specify text colour ourselves please? We make extensive use of this on a number of forums, eg:
And:
1 Like