-
Notifications
You must be signed in to change notification settings - Fork 2.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Change Text Color on "Aqua" background #8088
Comments
So here's an interesting bit of trivia: There's a utility function in NetBox called >>> from utilities.utils import foreground_color
>>> foreground_color('00ffff')
'ffffff' I do agree that black text is more legible, but I don't recall where the formula it uses came from originally and I'm hesitant to tweak it. Might need to do a bit more research. |
The source of the function appears to be a stackoverflow answer. The RGB multipliers, I believe, come from NTSC's RGB to YIQ conversion formula, where |
W3 has a page that uses a threshold of 150. On the same page is a slider you can play around with to see how well it works, it works significantly better with 150. You can check out the source of the W3 page and look for |
Thanks for the pointers, @hSaria! |
NetBox version
v3.1.0
Feature type
Change to existing functionality
Proposed functionality
Change text color on aqua background.
From this:
To this:
Use case
To see the text on an "aqua" background more clearly.
Database changes
No response
External dependencies
No response
The text was updated successfully, but these errors were encountered: