Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Join us at FabCon Atlanta from March 16 - 20, 2026, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM. Register now.

Reply
Anonymous
Not applicable

Set shape color in Theme .json

Hi community,

I'm in the process of building a PBI template for a customer. I've got an issue with the standard fill of shapes that I can't seem to get working. Here's the code that I'm using:

 

 

{
	"name": "ShapeTemplate",
	"visualStyles": {
		"shape": {
			"*": {
				
				"fill": [{
					"show": true,
					"fillColor": { "solid": { "color": "#FFFFFF"}},
					"transparency": 0
				}],
				"visualHeader": [{
					"show": false
				}]
			}
		},
		"page": {
			"*": {
				"background": [
					{
						"color": {
							"solid": {
								"color": "#CCCCCC"
							}
						},
						"transparency": 100
					}
				],
				"outspace": [
					{
						"color": {
							"solid": {
								"color": "#CCCCCC"
							}
						},
						"transparency": 0
					}
				]
			}
		}
	}
}

 

 

 

I've am able to show/hide the fill using the code above, but it seems like the 'fillColor' parameter does not work for me. Has anyone of you been able to get the fill color working in their templates? If so then I'm curious how you all did it.

 

kind regards

1 ACCEPTED SOLUTION
Anonymous
Not applicable

Hi @Anonymous ,

 

Please try this code and test whether it will work.

For referenec: https://github.com/deldersveld/PowerBI-ThemeTemplates/blob/master/Shape.json

{
	"name": "ShapeTemplate",
	"visualStyles": {
		"basicShape": {
			"*": {
				"line": [{
					"lineColor": { "solid": { "color": "#01B8AA"}},
					"transparency": 0,
					"weight": 3,
					"roundEdge": 0
				}],
				"fill": [{
					"show": true,
					"fillColor": { "solid": { "color": "#DDDDDD"}},
					"transparency": 0
				}],
				"rotation": [{
					"angle": 0
				}],
				"visualHeader": [{
					"show": false
				}]
			}
		}
	}
}

And you can check the official document about power bi themes.  It listed all the properties: (notice: some of the properties can be confited but they not really enabeld to settings since power bi did not release them to GA for theme usage)

Use report themes in Power BI Desktop - Power BI | Microsoft Docs

 

Best Regards,
Rico Zhou

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

3 REPLIES 3
Anonymous
Not applicable

Hi @Anonymous ,

 

Please try this code and test whether it will work.

For referenec: https://github.com/deldersveld/PowerBI-ThemeTemplates/blob/master/Shape.json

{
	"name": "ShapeTemplate",
	"visualStyles": {
		"basicShape": {
			"*": {
				"line": [{
					"lineColor": { "solid": { "color": "#01B8AA"}},
					"transparency": 0,
					"weight": 3,
					"roundEdge": 0
				}],
				"fill": [{
					"show": true,
					"fillColor": { "solid": { "color": "#DDDDDD"}},
					"transparency": 0
				}],
				"rotation": [{
					"angle": 0
				}],
				"visualHeader": [{
					"show": false
				}]
			}
		}
	}
}

And you can check the official document about power bi themes.  It listed all the properties: (notice: some of the properties can be confited but they not really enabeld to settings since power bi did not release them to GA for theme usage)

Use report themes in Power BI Desktop - Power BI | Microsoft Docs

 

Best Regards,
Rico Zhou

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Hello,

 

Did some ever achieved to set shape border / background with theme ? I tried several things found on differents pages with no success.

It seems to be broken.

After lots of research I finally found a working JSON for shape https://community.powerbi.com/t5/Report-Server/New-Shapes-in-PBI-How-to-Setup-JSON/m-p/1880186

Helpful resources

Announcements
FabCon Global Hackathon Carousel

FabCon Global Hackathon

Join the Fabric FabCon Global Hackathon—running virtually through Nov 3. Open to all skill levels. $10,000 in prizes!

October Power BI Update Carousel

Power BI Monthly Update - October 2025

Check out the October 2025 Power BI update to learn about new features.

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.