cancel
Showing results for 
Search instead for 
Did you mean: 

Improve ColorFade to handle Transparency

Hi,

 

ColorFade has some nice uses, but it does not cover some use cases. Most importantly, it does not handle transparency. 

 

IMO, the most flexible way to improve color handling to make items look different according to state, and maintain thematic accuracy in the app avoiding formula contortionism, would be to overload ColorFade with additional optional parameters.

 

ColorFade would still be useable as-is, with only 2 parameter, but would also have the following optional parameters and usage:

 

Improved ColorFade Proposal: 

 

ColorFade( Color, FadeAmount , optional ColorMinimum, optional ColorMaximum, optional BlendMode)

 

ColorMinimum - Color enumeration or RGBA value. When omitted, ColorFade preserves the current behavior, with FadeAmount values between -1 > and < 0 blending to the default Color.Black - same as RGBA(0,0,0,1).

 

ColorMaximum - Color enumeration or RGBA value. When omitted, ColorFade preserves the current behavior, with FadeAmount values between 0 > and < 1 blending to the default Color.White - same as RGBA(255,255,255,1).

 

BlendMode - PowerApps leverages CSS and Javascript for its engine. It should not be too hard to expose the CSS existing blendmodes inside PowerApps for additional flexibility. CSS: mix-blend-mode

 

https://www.w3.org/TR/compositing-1/#mix-blend-mode

 

HTML/SVG Blend support: 91%+ according to caniuse.org

https://caniuse.com/#feat=css-mixblendmode

 

mix-blend-mode: normal|multiply|screen|overlay|darken|lighten|color-dodge|color-burn|difference|exclusion|hue|saturation|color|luminosity;

 

Adding ColorMinimum and ColorMaximum already provide a good deal of flexibility, and handles transparencies. They do not depend on BlendMode to work.

BlendMode is an extra parameter for additional flexibility in handling dynamic colors. It would be super useful to use, and to create richer components (PCF) 

Status: New