It depends a lot on how the chat thing is set up, but it is definitely possible to access the text colour of an element using JS and potentially modify it to something else. If you wanted to get fancy, you could even utilise a library like TinyColor, which can help you detect whether any given colour is readable against a certain background colour and select a more readable alternative.
Any color preview plugins that support `modern` rgb() css functions?
5 projects | reddit.com/r/neovim | 7 Aug 2022
Is there a way to do something similar to this in aseprite?
1 project | reddit.com/r/PixelArt | 6 Aug 2022
Show HN: Penumbra, a perceptually optimized color palette based on natural light
11 projects | news.ycombinator.com | 4 Aug 2022
1 project | news.ycombinator.com | 3 Aug 2022