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.
@Meagan . this is exemplary, voilà.
Very intesting use of Power Query to get the values.
What I loved most, was the relationship between Math and Colors. (luminance calculation).
Well done. I am going to keep this link or post handy for my reporting design from now on.