Change highlight color of selected CHAT message block

AI-generated summary

In the Support category, user Wall-E reported that selecting a chat message in the ‘Grey Amber’ dark theme results in a harsh highlight color. They inquired if there is a specific component to adjust this for chat messages, noting confusion about whether existing personal message color settings applied to chat. User Lilly responded that the highlight should utilize the CSS variable var(--d-selected), suggesting the current color might be overridden. They advised checking the color palette settings at /admin/config/colors/ and provided a link to the relevant Discourse code. Furthermore, Lilly noted that --d-selected and --d-hover were reintroduced in January 2023, recommending that the user update their color palette to resolve the issue.

When we select a message in the chat of a dark theme (here, Grey Amber), the highlighted message block really hurts the eyes (see screenshot, bottom message block). I do see a component to change the color of personal message ( Change color of personal messages ) , but is there one that can easily change it for personal chat messages? It was unclear to me if this component was for personal messages (inbox), or personal CHAT messages.

that doesn’t look right.

I think it should be using var(--d-selected) which is #272727 in Grey Amber. looks like maybe the color is overridden?

check your Grey Amber color palette at /admin/config/colors/, it should look like this:

code is here:

@moin pointed to me out that --d-selected and --d-hover were add back in 2023-01-27T08:00:00Z, so you may just need to update your color palette.

https://github.com/discourse/discourse/pull/20026/