generate_palette
Compute a color palette for a Power BI theme, covering data colors, status indicators, and conditional formatting scale, using harmonic, monochrome, or gradient modes.
Instructions
Compute a palette and write it into the theme: dataColors[] + good/neutral/bad + CF min/center/max. mode=harmonic (hue-wheel off baseColor) | monochrome (lightness ramp of baseColor) | gradient (interpolate baseColor->... actually gradientFrom->gradientTo). For gradient pass gradientFrom + gradientTo; otherwise pass baseColor.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| n | No | how many data colours to emit | |
| mode | No | harmonic | monochrome | gradient | harmonic |
| baseColor | No | base colour hex (harmonic/monochrome) | |
| gradientTo | No | gradient end hex (gradient mode) | |
| gradientFrom | No | gradient start hex (gradient mode) | |
| reportSessionId | Yes |