-
Notifications
You must be signed in to change notification settings - Fork 56
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
Follow BS #30168 (WCAG algo + update master) #323
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
good idea to manage values as static!
Props to @ysds in Bootstrap's team, and in Material (already used this years ago…). |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ok
Note: Please remember that both in Bootstrap & Boosted, in v4 or v5, the
color-yiq()
function is white-first, meaning if the color contrast ratio with white is sufficient, function returns white — and only returns black otherwise.Test
I'm using a single SCSS file to check
color-yiq()
results.Results
v4-dev
v5-dev
#0d6efd
#000
#fff
#fff
#fff
#6610f2
#fff
#fff
#fff
#fff
#6f42c1
#fff
#fff
#fff
#fff
#d63384
#000
#fff
#000
#fff
#dc3545
#000
#fff
#000
#fff
#fd7e14
#fff
#000
#000
#000
#ffc107
#000
#000
#000
#000
#28a745
#000
#000
#000
#000
#20c997
#000
#000
#000
#000
#17a2b8
#000
#000
#000
#000
#fff
#000
#000
#000
#000
#6c757d
#fff
#fff
#fff
#fff
#343a40
#fff
#fff
#fff
#fff
FYI Colour Contrast Analyzer gives the same result than Contrast-Finder.