| name | theme-customization |
| description | Use when creating, modifying, or auditing Power BI report themes. Triggers: "create a theme", "design a theme", "build a theme", "apply theme", "update theme colors", "change theme typography", "set text classes", "enforce theme compliance", "audit theme adherence", "push formatting to theme", "promote bespoke formatting to theme", "clear visual overrides", "standardize report formatting", "validate a theme", "add visual-type overrides to theme", "sentiment colors", "dataColors palette". |
| user-invocable | true |
Skill: Theme Customization
Purpose
Create, modify, validate, and enforce Power BI report themes. A well-designed theme ensures visual consistency across the report by pushing formatting into a centralized JSON file rather than scattering overrides across individual visuals.
When a report is driven by a UI mockup, screenshot, Figma file, or React prototype, this skill should be used early to extract and encode the visual design system before heavy PBIR implementation begins.
Prerequisites
- ✅ A PBIP project exists with
<ProjectName>/PBIP/<ProjectName>.Report/ folder.
- ✅ The theme file lives at
StaticResources/SharedResources/BaseThemes/<ThemeName>.json or StaticResources/RegisteredResources/<ThemeName>.json.
- ✅
definition/report.json references the theme via themeCollection.customTheme.name.
References — Load on Demand
| Reference | Path | When to Load |
|---|
| Theme JSON Structure | references/theme-json-structure.md | Creating or modifying a theme |
| Visual Type Overrides | references/visual-type-overrides.md | Adding type-specific overrides |
| Theme Validation Checklist | references/theme-validation-checklist.md | Validating or auditing a theme |
Optional PBIR CLI Backend
When the local pbir CLI is available, it may be used as an execution helper for theme inspection and theme application.
Good fits:
pbir theme colors
pbir theme text-classes
pbir theme fonts
pbir theme set-colors
pbir theme set-text-classes
pbir theme set-formatting
pbir theme validate
Rules:
- The theme JSON in the repository remains the source of truth.
- Do NOT run
pbir setup.
- Prefer theme-level changes over visual-level overrides even when the CLI can change both.
- If the CLI is unavailable or cannot express the required change cleanly, fall back to direct theme JSON edits guided by repository references.
The Formatting Hierarchy
Power BI applies formatting through a four-level cascade:
Level 1 Power BI built-in defaults
Level 2 Theme wildcard: visualStyles["*"]["*"] → ALL visuals
Level 3 Theme visual-type: visualStyles["lineChart"]["*"] → overrides wildcard for that type
Level 4 Visual instance: visual.json objects → overrides everything
Core principle: Push as much formatting as possible into levels 2 and 3. Visual-level overrides (level 4) should exist only for true one-offs or conditional formatting.
Workflows
A) Create a New Theme
- READ
references/theme-json-structure.md for complete structure reference.
- Start from a valid base — use
examples/minimal-custom-theme.json or examples/enterprise-theme.json. Never author from an empty {}.
- Design the color system first:
dataColors: 6-12 hex values, muted/desaturated, visually distinguishable
- Semantic colors:
good, bad, neutral (flat hex at root level)
- Background/foreground variants
- Set typography (
textClasses): title, header, label, callout, dataTitle. Use Segoe UI / Segoe UI Semibold only.
- Set wildcard container defaults (
visualStyles["*"]["*"]): title, background off, border off, dropShadow off, padding.
- Add visual-type overrides — READ
references/visual-type-overrides.md. At minimum: textbox and image to suppress container chrome.
- Validate — READ
references/theme-validation-checklist.md and apply all checks.
- Place file at
StaticResources/SharedResources/BaseThemes/<ThemeName>.json.
- Update
report.json to reference the theme.
B) Modify an Existing Theme
- READ the existing theme file to understand current structure.
- Identify the change scope: colors, typography, wildcard, visual-type overrides.
- Apply changes following the structure from
references/theme-json-structure.md.
- Validate with
references/theme-validation-checklist.md.
B.1) Theme-First Workflow for Mockup-Driven Reports
When a visual mockup is available, prefer a theme-first approach before detailed PBIR layout work.
- Extract design tokens from the mockup: page background, card surfaces, accent colors, sentiment colors, typography hierarchy, spacing rhythm, and container treatment.
- Encode reusable tokens in the theme JSON first instead of scattering them across visuals.
- Reserve visual-level overrides for true one-offs, SVG content, Deneb specifics, or conditional formatting.
- Align
good, bad, and neutral with the mockup's semantic cues when possible.
- Document any mockup styling that cannot be expressed in the theme and must remain a visual-level approximation.
This reduces drift between design intent and implementation and improves consistency when a mockup must be translated into a Power BI-feasible visual language.
C) Promote Visual Overrides to Theme
When visuals have accumulated bespoke formatting that should become defaults:
- Audit: Identify which visuals have
objects or visualContainerObjects overrides.
- Classify each override:
- Stale: Duplicates theme value → remove from visual
- Conflicting: Different from theme → promote to theme or document as exception
- Conditional formatting: Expression-based → never promote, keep in visual
- Decide placement: Wildcard (
["*"]["*"]) for universal, visual-type (["<type>"]["*"]) for type-specific.
- Write the value into the theme JSON.
- Remove the override from the visual.
- Verify the visual still renders correctly.
D) Audit Theme Compliance
- Establish baseline: Read theme wildcard and type-level sections.
- Scan visuals: Find all
visual.json files with objects or visualContainerObjects.
- Compare: For each override, check if it matches or conflicts with the theme.
- Report findings using severity levels:
- Critical: Chrome overrides contradicting theme across multiple visuals
- Warning: Individual property differences from theme defaults
- Suggestion: Empty/null override keys, redundant values
Anti-Hallucination Rules
- Never invent theme property names — verify against the theme JSON schema or the
references/visual-type-overrides.md index.
- Color format matters:
textClasses uses plain hex strings ("color": "#343a40"); visualStyles uses object wrappers ({"solid": {"color": "#343a40"}}). Mixing them causes silent failures.
- Supported fonts only: Segoe UI, Segoe UI Semibold, Segoe UI Light, Segoe UI Bold, Arial, Calibri, Candara, Consolas, Courier New, DIN, Georgia, Tahoma, Times New Roman, Trebuchet MS, Verdana. No custom fonts.
- Semantic colors are root-level keys (
"good": "#2f9e44"), NOT nested under a sentimentColors object.
- Array wrapper required: All
visualStyles container values must be wrapped in [{...}].
Schema and Documentation