'Power Bi code to assign hexadecimal color to stacked bar chart with 53 levels with text data

Working on a stacked bar chart with PowerBi desktop up to 53 levels. Sometimes fewer levels, sometime more. Need to assign a color that is the same irrespective of underlying data. Certainly, there is a way to assign the same hex color code for a specified level.

The problem is each bar chart needs to have each bar hex color code manually assigned by GUI. Any one able to suggest how I can accomplish using program code? Thank you.



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source