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

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more

Reply
luojiandanPBI
Helper I
Helper I

how to get default background color?

how to get default background color?

luojiandanPBI_0-1698496592833.png

thank you for your help.

 

1 ACCEPTED SOLUTION
dm-p
Super User
Super User

Hi @luojiandanPBI,

 

It's not possible to obtain the details on the background color of the container. I have previously asked for this, but MS has declined to implement it. If more developers request it, it may suggest a greater need for this in the community.

 

Bear in mind that the report canvas may have a specific color applied, and the visual container won't know about this, so it wouldn't be entirely foolproof.

 

Regards,

 

Daniel





Did I answer your question? Mark my post as a solution!

Proud to be a Super User!


On how to ask a technical question, if you really want an answer (courtesy of SQLBI)




View solution in original post

7 REPLIES 7
dm-p
Super User
Super User

Hi @luojiandanPBI,

 

It's not possible to obtain the details on the background color of the container. I have previously asked for this, but MS has declined to implement it. If more developers request it, it may suggest a greater need for this in the community.

 

Bear in mind that the report canvas may have a specific color applied, and the visual container won't know about this, so it wouldn't be entirely foolproof.

 

Regards,

 

Daniel





Did I answer your question? Mark my post as a solution!

Proud to be a Super User!


On how to ask a technical question, if you really want an answer (courtesy of SQLBI)




Hi,Daniel,Thanks 🤝

luojiandanPBI
Helper I
Helper I

@lbendlin hi,can you give me some advince?thanks:)

Unfortunately this is outside my area of expertise. I hope someone else can help you further.

Thank you for your continued attention and have a good day!

lbendlin
Super User
Super User

Please provide a more detailed explanation of what you are aiming to achieve. What have you tried and where are you stuck?

thank you for reply.

I want to add watermark for custom visual.

and I try this,but false.

this.settings = Visual.parseSettings(options && options.dataViews && options.dataViews[0]);
console.log("objects:",options.dataViews[0].metadata.objects);
console.log("default bgColor:",options.dataViews[0].metadata.objects['style'].backgroundColor);

 

Helpful resources

Announcements
Power BI DataViz World Championships

Power BI Dataviz World Championships

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!

November Power BI Update Carousel

Power BI Monthly Update - November 2025

Check out the November 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.