cancel
Showing results for 
Search instead for 
Did you mean: 

Opacity Function/Property

There are 4 ways to get color:

  • Color.Name
  • ColorValue()
  • ColorFade()
  • RGBA()

It's pretty versatile. Only one of the functions can change opacity though--that's RGBA(). The next step to improving color ability is by having a Function for adjusting the opacity. I tried with ColorFade, but it only turns things black/white and is not able to affect transparency.

 

I think a Function may be better than a Property because it could fit in existing properties for Fill and Color.

Status: Completed

See usage notes for Code Fade here:

https://powerapps.microsoft.com/en-us/tutorials/function-colors/

 

I've leveraged this for the opacity of my disabled button fill so that the user can read the button text even when the button is disabled (I set it at 80% for example). Let me know if you need more syntax examples.

 

Audrie

 

 

 

Comments
Anonymous
Not applicable

idea

Alpha(Color.Name,50%)

ColorAlpha(Color.Name,50%)

 


 

Community Champion

It may also be interesting to have opacity as a property that could fit different objects--suppose you want to fade an image for a moment.

Anonymous
Not applicable

@mr-dang

there is a transparency property at image value 0 to 1

Power Automate
Status changed to: Completed

See usage notes for Code Fade here:

https://powerapps.microsoft.com/en-us/tutorials/function-colors/

 

I've leveraged this for the opacity of my disabled button fill so that the user can read the button text even when the button is disabled (I set it at 80% for example). Let me know if you need more syntax examples.

 

Audrie

 

 

 

Advocate III

I don't think this idea is Completed at all.

 

ColorFade does not change the Opacity, it just makes it brighter or darker. But not more "see-trough".

Kudo Kingpin

Agreed, this is not completed.  ColorFade() only fades the color - does not change transparency.  

It should be noted that the "ColorPicker" sample custom component doesn't do this correctly either - the slider there is used BOTH to set opacity (ColorFade()) as well as Transparency (Alpha channel into RGBA).  Depending on how you "pick" your color, you actually end up with two different colors out of this.  I've been working to make it work properly.

 

Believe that a ColorAlpha() function, as suggested would be useful.

BTW - you can actually do some contortions to get this, but its not pretty...  

Continued Contributor

@mr-dang This is not Complete. 

ColorFade does not handle alpha. It only brightens to White or Black. 

 

Advocate I

changing a colors opacity is not possible. E.g. I can not take a Color like Color.Red or Label1.Color and call something like

Opacity(Label1.Color, 50%)

 

Advocate I

@Audrie-MSFT this was marked as complete incorrectly. The existing functions do not handle alpha channel, which is part of this request. 

Advocate I

I have messaged Audrie-MSFT requesting to reopen this idea.