agentleFS
wardawgmalviciouswardawgmalvicious/agent-config/skills/powerbi/pbir-themes/SKILL.md

pbir-themes

Skill1 starsChanged 57 days agoMITView on GitHub

Use when authoring or editing a Power BI report theme JSON under Report.Report/StaticResources/SharedResources/BaseThemes/ or RegisteredResources/. Covers top-level theme properties (name, dataColors palette, semantic colors background/foreground/tableAccent, sentiment good/bad/neutral/minimum/maximum/center, textClasses title/label/callout/header, visualStyles), inheritance (wildcard, per-visualType, per-instance visual.json), state keys (default, hover, press, selected), theme JSON value conventions — BARE numbers never D/L suffixes, BARE hex without inner quotes, unlike visual.json — ThemeDataColor with ColorId + Percent tint, container vs chart object properties, textClasses, outspacePane styling (colors, text, backgrounds, input colors, width), filterCard targeting Available/Applied/GUID, wildcard + override patterns, clearing stale overrides via pbir visuals clear-formatting --keep-cf -f.

The file

We split this skill into the rules it gives an agent

1 rule. About 0 are common, 0 are distinctive, and 1 is very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈0

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 1

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Very specific:

    Place under visualStyles["*"]["*"] or per visual type.

    line 114

≈ “Common” is an estimate: at least 1 in 5 of the 213,897 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

PBIR Theme Reference

Themes define default formatting inherited by all visuals. Review the theme BEFORE editing individual visuals.

File Locations

ThemePath
Base (built-in)Report.Report/StaticResources/SharedResources/BaseThemes/<Name>.json
CustomReport.Report/StaticResources/RegisteredResources/<Name>.json

Both referenced in report.json:

"themeCollection": {
  "baseTheme": {"name": "CY24SU10", "type": "SharedResources"},
  "customTheme": {"name": "MyTheme.json", "type": "RegisteredResources"}
}

Base Themes (verified 2026-09-08)

Custom themes layer on top of a base theme. Three are shipped:

Base themeStatusNotes
Fluent 2GA — default for new reports, Desktop and serviceModern Fluent 2 styling. New pages default to 1920x1080 (initial page stays 1280x720). Adds chart / button / slicer / small-multiples style presets.
Classic 2026Previous default base themeIncremental refresh of CY24SU10-era defaults.
Classic 2018Legacy compatibilityOriginal base theme; reports created before 2026.

Switch via View ribbon → toggle on the Theme pane → Theme settings → Base theme dropdown. The Theme pane replaced the Customize-theme dialog at GA; it is sectioned as Theme settings (import / export / remove), Colors (palette, data, structural, sentiment, divergent), Text, Visual properties (background, border, header icons, tooltip, shadow, padding), Page (canvas settings, background, wallpaper), Filter pane, and Filter cards — the same surface a custom theme JSON encodes. An "Update to the latest base theme" banner with an Update theme button appears when a newer base ships; the Reset to default tile in the Themes dropdown removes the custom theme without touching per-visual formatting.

Announced GA in the August 2026 update; page confirmed GA on 2026-09-07. No Desktop build number was verified.

The published theme JSON schema referenced by visualStyles tracks the latest base — current is reportThemeSchema-2.149.json (under microsoft/powerbi-desktop-samples on GitHub).

Top-Level Theme Properties

PropertyTypeNotes
namestringTheme name
dataColorsstring[]Palette hex strings, 0-indexed (referenced by ColorId)
background / foreground / tableAccentstringSemantic colors
good / bad / neutral / minimum / maximum / centerstringSentiment colors
textClassesobjecttitle, label, callout, header → fontSize, fontFace, color
visualStylesobject[visualType][state] formatting overrides

Inheritance Hierarchy (broad → specific)

  1. Wildcard visualStyles["*"]["*"] — all visuals
  2. Visual type visualStyles["lineChart"]["*"] — overrides wildcard for that type
  3. Visual instance — objects / visualContainerObjects in visual.json (see pbir-visual-json for the objects vs visualContainerObjects split in schema 2.4.0+)

Fonts resolve differently since the Fluent 2 GA: font overrides were removed from the base theme, so textClasses now applies consistently across all visuals instead of being shadowed per-visual by the base. A custom theme that previously needed per-visual visualStyles font entries to beat the base may now be over-specified.

visualStyles Structure

Two-level keys: [visualType][state]. Second level is a state, not an instance selector.

StateMeaning
"*"Default (normal rendering) — most common
"hover"Hover state
"press"Press/click state
"selected"Selected state
"visualStyles": {
  "slicer": {
    "*":     {"items": [{"fontColor": {"solid": {"color": "#000000"}}}]},
    "hover": {"items": [{"fontColor": {"solid": {"color": "#118DFF"}}}]}
  }
}

Theme JSON Value Conventions

TypeTheme JSONvisual.json
Integer14{"expr": {"Literal": {"Value": "14L"}}}
Float14.5"14.5D"
Booleantrue"true"
Hex color"#e03131" (bare)"'#e03131'" (inner quotes)
ThemeDataColor{"solid": {"color": {"ThemeDataColor": {"ColorId": 0, "Percent": 0}}}}Same shape wrapped in expr

Never use D / L suffixes in theme JSON — bare numbers only.

ThemeDataColor

{"solid": {"color": {"ThemeDataColor": {"ColorId": 5, "Percent": 0.4}}}}
PropertyNotes
ColorId0-based index into dataColors[]
Percent0 = exact, 0.1..1.0 = lighter, -1.0..-0.1 = darker

Container Properties (visualContainerObjects)

Place under visualStyles["*"]["*"] or per visual type. Arrays of property objects.

ObjectKeys
titleshow, fontSize, fontFamily, fontColor, alignment
subTitleshow, fontSize, fontFamily, fontColor
backgroundshow, color, transparency
bordershow, width, color, radius
dropShadowshow, angle, distance, blur, color
paddingtop, bottom, left, right
dividershow, color, style, width
visualHeadershow
visualTooltiptype, titleFontColor

Visual Object Properties (objects)

Chart-specific formatting keys placed under visualStyles["*"]["*"] or per visual type: categoryAxis, valueAxis, labels, legend, dataPoint, plotArea, lineStyles, markers.

textClasses

"textClasses": {
  "title":   {"fontSize": 14, "fontFace": "Segoe UI Semibold"},
  "header":  {"fontSize": 12, "fontFace": "Segoe UI Semibold"},
  "label":   {"fontSize": 11, "fontFace": "Segoe UI"},
  "callout": {"fontSize": 45, "fontFace": "DIN"}
}

CY24SU10 defaults: callout 45 DIN, title 12 DIN, header 12 Segoe UI Semibold, label 10 Segoe UI. All #252423.

Filter Pane Styling — outspacePane (owned here)

Location: visualStyles["*"]["*"].outspacePane. Theme owns every styling property of the filter pane. Visibility / expansion state is separate — see pbir-filters for report.json → objects.outspacePane.

PropertyTypeNotes
backgroundColorcolor{"solid": {"color": ...}} or ThemeDataColor
transparencyinteger0-100 (bare)
borderbooleanShow vertical separator
borderColorcolorSeparator color
fontFamilystringTriple-quoted fallback chain
foregroundColorcolorText, icons, buttons
titleSizeintegerPoints
headerSizeintegerPoints
searchTextSizeintegerPoints
inputBoxColorcolorInput field background
checkboxAndApplyColorcolorApply button, checkboxes
widthintegerPixels

Filter Card Styling — filterCard

Location: visualStyles["*"]["*"].filterCard (array). Target specific card states via $id.

$idTargets
"Available"Unapplied filters (filter pane list)
"Applied"Actively applied filters
"<GUID>"Specific filter by its name from filterConfig
PropertyType
backgroundColorcolor
transparencyinteger 0-100
borderboolean
borderColorcolor
fontFamilystring
foregroundColorcolor
textSizeinteger
inputBoxColorcolor

Note: filterCard without $id can also live at visualStyles["page"]["*"].filterCard as a base fallback.

Wildcard + Override Pattern

{
  "visualStyles": {
    "*": {
      "*": {
        "title": [{"show": true, "fontSize": 12}]
      }
    },
    "textbox": {
      "*": {
        "title":      [{"show": false}],
        "background": [{"show": false}],
        "border":     [{"show": false}],
        "dropShadow": [{"show": false}]
      }
    }
  }
}

pbir CLI

pbir theme colors "Report.Report"                    # list palette
pbir theme set-formatting "Report.Report" ...        # set properties
pbir visuals clear-formatting "Report.Report/**/*.Visual" --keep-cf -f

Without CLI use jq with temp-file pattern:

THEME=$(jq -r '.themeCollection.customTheme.name' Report.Report/definition/report.json)
THEME="Report.Report/StaticResources/RegisteredResources/$THEME"
jq '.visualStyles["*"]["*"].title[0].fontSize = 14' "$THEME" > "$THEME.tmp" && mv "$THEME.tmp" "$THEME"
jq empty "$THEME"

Clearing Visual-Level Overrides (Enforce Theme)

Stale objects / visualContainerObjects in visual.json override theme defaults.

  • Clear container only (safe, preserves CF): jq 'del(.visualContainerObjects)' visual.json
  • Clear all bespoke formatting (removes CF too): jq 'del(.objects) | del(.visualContainerObjects)' visual.json

Gotchas

IssueCauseFix
D/L suffix rejected in themeUsed visual.json literal shapeTheme JSON uses bare numbers
Hex color rendered as literal textInner single quotes "'#fff'" in themeTheme uses bare "#ffffff"
id key ignored in filterCardUsed "id"Theme uses "$id"
Filter pane styling causes deploy errorStyling placed in report.json outspacePaneOnly visible/expanded allowed in report.json — move styling to theme
Theme changes invisible after applyStale visualContainerObjects in visualsRun pbir visuals clear-formatting --keep-cf -f
ColorId out of rangePalette has fewer entries than referencedCheck dataColors[] length
Font fallback chain brokenNot triple-quoted"'Segoe UI Semibold', wf_segoe-ui_semibold, helvetica, arial, sans-serif"
Inheritance not applyingPut properties at wrong state keyDefault state is "*", not "default"
Third-level "*" catch-all confusingReal themes sometimes nest another "*" for generic propsTreat as fallback; normal paths still work
textClasses not inheritingUsed fontSize as stringMust be bare integer

Reference

See also

  • pbir-visual-json — visual.json value conventions (D/L/M suffixes, inner-quoted hex)
  • pbir-filters — filter pane visibility (visible, expanded) on report.json
  • pbir-conditional-formatting — ThemeDataColor in CF expressions
  • pbir-cli — pbir theme subcommands

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.