User talk:Galobtter/scripts/adminhighlighter

Page contents not supported in other languages.
From Wikipedia, the free encyclopedia

Interaction with users with background colors in signatures[edit]

Hi @Galobtter! Following up from this thread with @Usedtobecool, it would be nice if this script could recolor usernames that might otherwise have contrast issues when highlighted. (Also, it looks like Theopolisme hasn't been active since 2019, so it might be a good idea to push users of that script to update to your fork.) Cheers, Sdkbtalk 17:41, 20 February 2024 (UTC)[reply]

@Sdkb I don't see any contrast issues with my script - it uses a very different css highlighting that is much less harsh on the eyes, and shouldn't cause any contrast issues. Yeah I don't if there's any real process to push people to use an updated version of a user script although of course I'd like it if people used my script. Usedtobecool maybe just switch to my script and that might fix your issues? :) Galobtter (talk) 00:56, 21 February 2024 (UTC)[reply]
That's good to know that there's not an issue in my particular case with your script, but there are presumably still some editors who might use a text color for their username that would create an issue, so for the general case there's still a potential fix needed. I'm not sure how difficult it would be for the script to check whether a username in a given color would go against the color contrast accessibility guidelines when highlighted by the script and change its color to black if so. Sdkbtalk 01:16, 21 February 2024 (UTC)[reply]
It seems it's hard to calculate a contrast ratio since the background is semi-transparent (per this calculator). Since the background is semi-transparent I think it's essentially overriden in most cases where there would be bad contrast (since the username would have some other background set). Galobtter (talk) 02:06, 21 February 2024 (UTC)[reply]
I have done so, thanks G. — Usedtobecool ☎️ 07:03, 21 February 2024 (UTC)[reply]