In today's article, I would like to share a quick solution i've put in place for one of my projects, where the colours keep changing and I wanted to be ready for any theme changes when required.
The different theme colours would be stored in a collection which will be referenced by the different Power Apps controls instead of hard coded.
I have created a simple screen, which allows me to set the different colours such as:
- Button fill,
- Button text,
- Border,
- Chevron background colour ...etc.
- Textbox
- Text input
- Dropdown
The colours values are expected in Hex format, we will use the ColorValue function to convert the colours to RGBA format.
If you want to learn more about ColorValue, ColorFade and different ways to convert hex to rgba and apply transparency, please visit the Microsoft reference ->
In addition, this panel, will render the collection definition, which you can just copy and paste in your project.
This area is the preview area, it allows you to view and amend the colours if you are not happy with the results.Enjoy !