Skip to main content
Microsoft logo
Power Apps
    • AI Builder
    • Automate processes
    • Azure + Power Apps
    • Build apps
    • Connect data
    • Pages
    • Take a guided tour
  • Pricing
    • Overview
    • Become a Partner
    • Find a Partner
    • Find partner offers
    • Partner GTM Resources
    • Blog
    • Customer stories
    • Developer Plan
    • Documentation
    • For IT Leaders
    • Roadmap
    • Self-paced learning
    • Webinars
    • App development topics
    • Overview
    • Issues
    • Give feedback
    • Overview
    • Forums
    • Galleries
    • Submit ideas
    • User groups
    • Register
    • ·
    • Sign in
    • ·
    • Help
    Go To
    • Power Apps Community
    • Welcome to the Community!
    • News & Announcements
    • Get Help with Power Apps
    • Building Power Apps
    • Microsoft Dataverse
    • AI Builder
    • Power Apps Governance and Administering
    • Power Apps Pro Dev & ISV
    • Power Apps Portals
    • Connector Development
    • Power Query
    • GCC, GCCH, DoD - Federal App Makers (FAM)
    • Power Platform Integration - Better Together!
    • Power Platform Integrations
    • Power Platform and Dynamics 365 Integrations
    • Community Blog
    • Power Apps Community Blog
    • Galleries
    • Community Connections & How-To Videos
    • Community App Samples
    • Webinars and Video Gallery
    • Canvas Apps Components Samples
    • Kid Zone
    • Emergency Response Gallery
    • Events
    • 2021 MSBizAppsSummit Gallery
    • 2020 MSBizAppsSummit Gallery
    • 2019 MSBizAppsSummit Gallery
    • Community Engagement
    • Community Calls Conversations
    • Experimental
    • Error Handling
    • Power Apps Experimental Features
    • Community Support
    • Community Accounts & Registration
    • Using the Community
    • Community Feedback
    cancel
    Turn on suggestions
    Auto-suggest helps you quickly narrow down your search results by suggesting possible matches as you type.
    Showing results for 
    Search instead for 
    Did you mean: 
    • Power Apps Community
    • Galleries
    • Community App Samples
    • Branding Template App V3

    Branding Template App V3

    09-17-2019 17:24 PM - last edited 03-18-2023 04:22 AM

    Super User iAm_ManCat
    Super User
    69274 Views
    LinkedIn LinkedIn Facebook Facebook Twitter Twitter
    iAm_ManCat
    Super User iAm_ManCat
    Super User
    • Mark as New
    • Bookmark
    • Subscribe
    • Mute
    • Subscribe to RSS Feed
    • Permalink
    • Print
    • Report Inappropriate Content

    Branding Template App V3

    ‎09-17-2019 05:24 PM

    (if you downloaded this before Feb 2nd 2022, please re-download!)

     

    This template will allow you to customize your theming (down to the control-level), and allows you to theme items that are not currently possible within the normal Power Apps Editor!

     

    There are also accessibility tools available within it that allow you to change your theme to an accessible theme or to change your font size on-the-fly.

    image.png

     

    If you want to read the full write-up on V3 of my Power Apps branding template, please feel free to view this on my site (although reading that is not required to download it at the bottom of this post, I do recommend it!):

    https://www.iammancat.dev/2022/01/power-apps-branding-template-v3/

     

    Home Screen 1 Newer.png

     

    If you just want to download the template, you can download it at the bottom of this article 🙂

     

    Cheers,

    Sancho Harker (iAm_ManCat)

     

     

     

    [

    If you want to edit your existing App to do granular edits to the .json files inside, extract it to a folder, do your editing, and then run the following powershell script (within this repository) from within that extracted folder after you've done modifications, which will reconstitute it into a .msapp file:

    https://github.com/iAmManCat/PowerApps-Branding-Template/tree/master/V3 

    ]

    @iAm_ManCat
    My blog

    Please 'Mark as Solution' if someone's post answered your question and always 'Thumbs Up' the posts you like or that helped you!


    Thanks!
    You and everyone else in the community make it the awesome and welcoming place it is, keep your questions coming and make sure to 'like' anything that makes you 'Appy
    Sancho Harker, MVP


    Preview file
    76 KB
    iAm_ManCat Branding Template V3.4.msapp
    Labels:
    • Labels:
    • Galleries and Forms
    • Solution
    Message 1 of 86
    69,274 Views
    112 Kudos
    Reply
    • All forum topics
    • Previous Topic
    • Next Topic
    • « Previous
      • 1
      • 2
      • 3
      • …
      • 9
    • Next »
    MacaurlyW
    MacaurlyW
    New Member
    • Mark as New
    • Bookmark
    • Subscribe
    • Mute
    • Subscribe to RSS Feed
    • Permalink
    • Print
    • Report Inappropriate Content

    ‎09-19-2019 01:18 AM

    Hi, this is a great build. I have only introduced myself to its capabilities this morning  and I am very impressed with its value for a PowerApps developer.

    I have been building a template app myself which currently allows you to configure at a control level accross the app (similar to what you said you are looking to do in the future). This means that controls have to be copied from a library screen as opposed to from the Insert ribbon, but any properties can then be configured in one place for all controls of the same type accross the app. I look forward to merging the ideas you have used into my template!

     

    I previously stored them colors in an Excel file in OneDrive so your version of a theme picker is massively more effiecient. I will be happy to share and get your input / after I have finished a version 2 of my template and also see whee you're at with your version. 

     

    Good work!

     

     

    Message 2 of 86
    61,088 Views
    5 Kudos
    Reply
    iAm_ManCat
    Super User iAm_ManCat
    Super User
    In response to MacaurlyW
    • Mark as New
    • Bookmark
    • Subscribe
    • Mute
    • Subscribe to RSS Feed
    • Permalink
    • Print
    • Report Inappropriate Content

    ‎09-19-2019 04:12 AM

    Thanks for your comment @MacaurlyW - Really appreciate it Cat Very Happy

     

    Yes, I originally had a copy-paste screen with controls and anyone could easily make something similar using this by creating a default copypaste screen with the Insert controls and then defining the shape or size to your needs - my main gripe with the copypasta method is/was that its not intuitive and your users will generally keep trying to use the Insert> method and will then set the colours manually which you then need to clean up or fix later if you are using theming

    - so creating this by reconstructing the actual .msapp file was my attempt at making it as user-friendly as possible while still allowing customization throughout 😄

     

    Future versions I plan on releasing will be:

    • a stripped-down version where you only need to set three colours and three text colours (to match those colours)
    • a version where you can set the default colours, width, height etc at a control-level (for Insert> items) so you could specify buttons as one set of colours for all new items and labels as another set of colours and sizes etc etc

    Cheers,
    Sancho

    @iAm_ManCat
    My blog

    Please 'Mark as Solution' if someone's post answered your question and always 'Thumbs Up' the posts you like or that helped you!


    Thanks!
    You and everyone else in the community make it the awesome and welcoming place it is, keep your questions coming and make sure to 'like' anything that makes you 'Appy
    Sancho Harker, MVP


    Message 3 of 86
    61,066 Views
    7 Kudos
    Reply
    R3dKap
    R3dKap Community Champion
    Community Champion
    • Mark as New
    • Bookmark
    • Subscribe
    • Mute
    • Subscribe to RSS Feed
    • Permalink
    • Print
    • Report Inappropriate Content

    ‎09-19-2019 08:47 AM

    @iAm_ManCat,

    I've been working for quite a time now on an application called PowerApps CTG (Custom Theme Generator) that would be similar to the PowerApps Theme Editor by @mehdis but that would be made WITH PowerApps so one could see the result right away on the various PowerApps controls.
    splash-screen.png   main-screen.png
    Its imperfections lies in the fact that it produces a JSON file that you must then manually reinject in you package file and that any existing control within the targeted app (when the theme JSON file is repackaged) would not automatically use the new template but only newly added controls.
    So I must admit your idea of putting variables directly inside the JSON theme file instead of just RGBA values is just brilliant (I am so disappointed at myself for not thinking about it earlier Smiley Happy).
    But now I am trying to see how I could mix the idea of using variables in the theme file with a more sophisticated interface to edit the palette values and change the default controls properties directly in the target application (thus replacing your Theme palette screen with a screen like the one I was building in my PowerApps CTG app). Also, the goal would be to try to get rid of the list of variables declared in the OnStart part of the application.
    In this reflexion I ended up imaginating that we could design a Theme screen as this:

    Image 23.png

    In the upper PALETTE section we would use rectangles'fill property to define palette color values, text inputs for numbers, etc.

    In the lower CONTROLS section we could insert every possible PowerApps controls which properties would be pointing at the palette above. You can see an example on the capture above: the button's Fill property would be set to point to the PrimaryColor1.Fill property of the rectangle in the PALETTE section.

    Then in the JSON file we would set the values of the palette to point to the colors and values in the PALETTE section of the screen, like this:

    Image 24.png

    And the controls styles properties values would point to the controls properties in the CONTROLS section of the screen, like this (all controls properties would have to be added in the JSON file):

    Image 25.png

    Putting all this together would allow us to:

    • change the palette by altering the elements in the upper PALETTE section of the screen, thus impacting the lower CONTROLS section controls, then impacting all controls used in the actual application screens
    • change the properties of the lower CONTROLS section controls, thus impacting all controls used in the application
    • make sure that (just like in your proposed solution) when inserting a new control from the PowerApps Insert tab, it relies on the THEME CONTROLS and THEME PALETTE
    • avoid having to declare any variable in the OnStart event of the application

    I'm eager to have your opinion on this... Smiley Happy

    Emmanuel

    Message 4 of 86
    60,930 Views
    7 Kudos
    Reply
    iAm_ManCat
    Super User iAm_ManCat
    Super User
    In response to R3dKap
    • Mark as New
    • Bookmark
    • Subscribe
    • Mute
    • Subscribe to RSS Feed
    • Permalink
    • Print
    • Report Inappropriate Content

    ‎09-20-2019 08:25 AM

    Hey @R3dKap 

     

    That's a really impressive App you're working on - I really like the design and layout! Cat Happy

     

    Yes, I'm am sure it is possible to do it via controls and label boxes because I've already been working on that myself Cat Very Happy - the next version to be published will include a set of screens for defining the colours, however I still want it to be able to jump between whole themes with one click so I will be consolidating the colours and keeping the existing Theme Palette page. Additionally, I am already in the process of moving the items from the OnStart as part of that process - this App was published publicly to define the concept as a first version and as a minimum viable product with additional versions, updates and features coming later.

     

    I really like the look of your App and am looking forward to seeing it published on the App Gallery for everyone to use 😄

     

    Cheers,

    Sancho

    @iAm_ManCat
    My blog

    Please 'Mark as Solution' if someone's post answered your question and always 'Thumbs Up' the posts you like or that helped you!


    Thanks!
    You and everyone else in the community make it the awesome and welcoming place it is, keep your questions coming and make sure to 'like' anything that makes you 'Appy
    Sancho Harker, MVP


    Message 5 of 86
    60,646 Views
    2 Kudos
    Reply
    R3dKap
    R3dKap Community Champion
    Community Champion
    In response to iAm_ManCat
    • Mark as New
    • Bookmark
    • Subscribe
    • Mute
    • Subscribe to RSS Feed
    • Permalink
    • Print
    • Report Inappropriate Content

    ‎09-25-2019 02:13 PM

    Hi @iAm_ManCat,

    I've been trying (without luck) to reproduce just the basics of your technique to dynamically set the theme colors to variables.

    I opened the XML theme file from my blank app, I modified the PrimaryColor2 property of the default theme palette to a variable named THMPrimaryColor2Value and set the type to x just as you did it in your own theme file.

    Image 1.png

    After repackaging my app and loading it into PowerApps, any control using the PrimaryColor2 property doesn't take the THMPrimaryColor2Value variable as its default value. By example, the Button control's fill color should be THMPrimaryColor2Value but it sticks to its default RGBA value.

    Any clue on what I could be missing here ?

    Emmanuel

    Message 6 of 86
    60,367 Views
    1 Kudo
    Reply
    Gabrz
    Gabrz Advocate IV
    Advocate IV
    • Mark as New
    • Bookmark
    • Subscribe
    • Mute
    • Subscribe to RSS Feed
    • Permalink
    • Print
    • Report Inappropriate Content

    ‎10-09-2019 08:05 AM

    Wow, this is a very nice timesaver.

     

    I've tried editing the Themes.json (changed a value "%CONTROL.ID%.Fill" into "%Palette.PrimaryColor2%" in the dropdown component) and then replaced the file in the .msapp.

     

    But when I open the file/App again in PowerApps and insert a Dropdown, all default values are reverted to the default RGB blue color. Also for every other input item the default values are reverted.

     

    Do you know what is happening, and how I can change the default values

     

    Message 7 of 86
    59,621 Views
    1 Kudo
    Reply
    Gabrz
    Gabrz Advocate IV
    Advocate IV
    • Mark as New
    • Bookmark
    • Subscribe
    • Mute
    • Subscribe to RSS Feed
    • Permalink
    • Print
    • Report Inappropriate Content

    ‎10-12-2019 04:39 AM

    I have this idea of storing all the values in a Collection (instead of all those single variables)

    // Set Palette Color Values for Light Theme
    ClearCollect(
        colCurrentPalette,
        { Name: "PrimaryColor1", Value: RGBA(238,243,246,1) },
        { Name: "PrimaryColor2", Value: RGBA(181,198,214,1) },
        { Name: "DisabledColor1", Value: RGBA(68,68,68,1) },
        { Name: "DisabledColor2", Value: RGBA(136,136,136,1) },
    );
    // Set Palette Derived Color Values for Light Theme
    Collect(
        colCurrentPalette,
        { Name: "TextColor1", Value: LookUp(colCurrentPalette,Name="PrimaryColor9",Value) },
        { Name: "HoverColor1", Value: LookUp(colCurrentPalette,Name="PrimaryColor9",Value) },
        { Name: "PressedColor1", Value: LookUp(colCurrentPalette,Name="PrimaryColor9",Value) },
        { Name: "PressedColor2", Value: LookUp(colCurrentPalette,Name="PrimaryColor3",Value) },
    );
    // Store Light Theme
    ClearCollect(
        colThemes,
        { Theme: "Light", Palette: colCurrentPalette }
    )

    And use LookUp in the Themes.json

    "palette": [
       {
          "name": "PrimaryColor1",
          "value": "LookUp(colCurrentPalette,Name=\"PrimaryColor1\",Value)",
          "type": "v"
       },

    But I'm not sure that would be beneficial?

     

    Pro's:  Less Variables, just one or two Collections.  Less Code when switching Theme/Brand.

    Con's: Not sure about performance (Lookup versus just a Variable)

     

    I'd like to hear your thoughts about it.

     

    Thanks

     

     

     

    Message 8 of 86
    59,558 Views
    1 Kudo
    Reply
    iAm_ManCat
    Super User iAm_ManCat
    Super User
    In response to R3dKap
    • Mark as New
    • Bookmark
    • Subscribe
    • Mute
    • Subscribe to RSS Feed
    • Permalink
    • Print
    • Report Inappropriate Content

    ‎10-24-2019 02:22 PM

    Hi @R3dKap

     

    Apologies for the delay in response, I've been working on something exciting that I'm not allowed to share Cat Wink

     

    I think the problem you might be facing is that your blank App has the structure of an App with controls and settings already in it - you will need to use a .msapp whose structure matches that of the Theme Generator files (or the older blank items) - there must be no folders within it and only a specific list of files:

    AuxDataMap.json

    Entities.json

    Header.json

    MacroTable.json

    Properties.json

    PublishInfo.json

    Themes.json

     

    Additionally, I initially set the properties as 't' for text rather than 'x' for variable and the process of opening the .msapp then changes these once they are exported again.

     

    I hope this helps with your Custom Theme Generator! I am looking forward to seeing it published to the Community App Samples Cat Very Happy

     

    Cheers,

    Sancho

    @iAm_ManCat
    My blog

    Please 'Mark as Solution' if someone's post answered your question and always 'Thumbs Up' the posts you like or that helped you!


    Thanks!
    You and everyone else in the community make it the awesome and welcoming place it is, keep your questions coming and make sure to 'like' anything that makes you 'Appy
    Sancho Harker, MVP


    Message 9 of 86
    59,240 Views
    5 Kudos
    Reply
    R3dKap
    R3dKap Community Champion
    Community Champion
    In response to iAm_ManCat
    • Mark as New
    • Bookmark
    • Subscribe
    • Mute
    • Subscribe to RSS Feed
    • Permalink
    • Print
    • Report Inappropriate Content

    ‎10-29-2019 02:11 AM

    Thanks @iAm_ManCat, I'll check that out soon... Thanks for the tip...

    Message 10 of 86
    59,143 Views
    3 Kudos
    Reply
    • « Previous
      • 1
      • 2
      • 3
      • …
      • 9
    • Next »

    Power Platform

    • Overview
    • Power BI
    • Power Apps
    • Power Pages
    • Power Automate
    • Power Virtual Agents

    Browse

    • Sample apps
    • Services

    Downloads

    • Windows
    • iOS
    • Android

    Learn

    • Documentation
    • Support
    • Community
    • Give feedback
    • Blog
    • Partners

    • © 2023 Microsoft
    • Follow Power Apps
    • Privacy & cookies
    • Manage cookies
    • Terms of use
    • Trademarks
    California Consumer Privacy Act (CCPA) Opt-Out Icon Your California Privacy Choices