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

Get certified in Microsoft Fabric—for free! For a limited time, get a free DP-600 exam voucher to use by the end of 2024. Register now

Reply
benvett14
Frequent Visitor

Transparent Data Color

I am trying to put a transparent visual on top of a card so that my end user can drill through the card. I need to make the data color transparent and thought using a field value as the color would allow me to do this. I have a measure that I also thought would result in this transparent color. I am not sure why the color is staying white after I format it to be based on the field value, any help is greatly appreciated!

 

Thanks,

 

I have attached some screenshots to help explain:

Transparent1.PNGTransparent2.PNG

 

 

 

 

1 ACCEPTED SOLUTION

since there is a bug in the color settings (can't enter a value as long as #FFFFFF00) it can work if you set the value of transparancy as a measure and than select this value using field vaue at the shape background color function as follows:

create a measure : 

mask_transparency =IF([Filter_Selected],”#FFFFFF00″,”#FFFFFF”)

set the backgound using the field value : 

trans.jpg

see also : Control the visibility of the PowerBI visuals based on condition 

View solution in original post

5 REPLIES 5
romankris
New Member

The HEX code for a transparent color is represented by "00" for its alpha channel, along with the six-digit HEX code for the RGB values. For example, if you want a transparent red color, the HEX code would be "#00FF0000." The "00" in the beginning represents full transparency, while "FF" represents the maximum intensity for red. Similarly, you can adjust the transparency level for other colors by modifying the alpha channel value.

 

The HEX code for a 50% transparent red color would be "#80FF0000." In this case, the "80" represents the alpha channel value, which determines the transparency level. The alpha channel ranges from 00 (completely transparent) to FF (fully opaque), with 80 representing approximately 50% opacity. The remaining six digits "FF0000" represent the RGB values for pure red. By adjusting the alpha channel value, you can create varying levels of transparency for different colors.

 

#00FF0000 --> Worked as transparent for me thanks. 
Burubear
Helper I
Helper I

Hi There, solution posted is really helpful and it works perfectly using desktop. But when I published it in the workspace and open it through Microsoft Edge, the formula doesn't work and it reverts back to the default blue color. Anyone experiencing the same. Would love to know if there are alternative or work-around for this since most of my users have Edge as their default web browser
v-alq-msft
Community Support
Community Support

Hi, @benvett14 

 

Please make sure that the field values are listed in the CSS color spec at https://www.w3.org/TR/css-color-3/. These color values can include:

 

  • 3, 6 or 8-digit hex codes, for example #3E4AFF. Make sure you include the # symbol at the start of the code.
  • RGB or RGBA values, like RGBA(234, 234, 234, 0.5).
  • HSL or HSLA values, like HSLA(123, 75%, 75%, 0.5).
  • Color names, such as Green, SkyBlue, or PeachPuff.

 

Based on my test, it works properly with "#3E4AFF" while it fails with "#FFFFFF00". For further information, you may refer to the document .

 

Best Regards

Allan

 

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

since there is a bug in the color settings (can't enter a value as long as #FFFFFF00) it can work if you set the value of transparancy as a measure and than select this value using field vaue at the shape background color function as follows:

create a measure : 

mask_transparency =IF([Filter_Selected],”#FFFFFF00″,”#FFFFFF”)

set the backgound using the field value : 

trans.jpg

see also : Control the visibility of the PowerBI visuals based on condition 

Helpful resources

Announcements
November Carousel

Fabric Community Update - November 2024

Find out what's new and trending in the Fabric Community.

Live Sessions with Fabric DB

Be one of the first to start using Fabric Databases

Starting December 3, join live sessions with database experts and the Fabric product team to learn just how easy it is to get started.

Las Vegas 2025

Join us at the Microsoft Fabric Community Conference

March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount! Early Bird pricing ends December 9th.

Nov PBI Update Carousel

Power BI Monthly Update - November 2024

Check out the November 2024 Power BI update to learn about new features.