Color contrast measurements via Power BI report
source link: https://community.powerbi.com/t5/Data-Stories-Gallery/Color-contrast-measurements-via-Power-BI-report/td-p/1295221
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.
Color contrast measurements via Power BI report
08-13-2020 21:45 PM
Color contrast can make your report focused, interesting, and accessible, if you use it correctly. This report advises you how to use two colors together in a report based upon WCAG 2.1 standards. For example, you can use two colors that have a contrast ratio of 3:1 for non-text chart components, but you should look for colors with a 4.5:1 color contrast for text. Enter colors from your last report, or from a Power BI theme to find out if they can be used in an inclusive design.
The report dataset was created entirely in Power Query by doing some color math. It uses a table of values from 1 to 255 to generate the 16 million possible colors, then converts the RGB value to Hex. It then linearizes the color values and calculates luminance. From there, the color contrast ratio is dynamically calculated in DAX as you enter new hex color values.
Recommend
About Joyk
Aggregate valuable and interesting links.
Joyk means Joy of geeK