Get certified in Microsoft Fabric—for free! For a limited time, the Microsoft Fabric Community team will be offering free DP-600 exam vouchers. Prepare now
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.
eyJrIjoiMWQxOTIxZmMtMWZjZS00MDFhLWJhMDUtMzkyYTUzNjZhMTM1IiwidCI6IjU0YTc3ZTU4LTliZjktNDc1OC05M2M3LTk0Y2ZkNmYwNTY3YSIsImMiOjZ9&pageName=ReportSection
@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.