web
You’re offline. This is a read only version of the page.
close
Skip to main content

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Apps / Color Mode Option with...
Power Apps
Answered

Color Mode Option with radio

(0) ShareShare
ReportReport
Posted on by 577 Super User 2024 Season 1

Hey guys, 

A bit of a complicated problem. I can get this to work if there are only two options. Ok, here we go.

 

I am creating a theme selector in my app(I know, not entirely necessary) and I was using toggles to open the help menu and close it. Another toggle to change themes. This worked fine with 2 different themes. The problem is I always like to have as open ended as possible. The sky is the limit!

 

I also need to mention that the components are part of a component library so talking to and from the app is complicated hahaha.

 

So, Open the help/faq pop up and select the radio button. Seems like it should work? I declare my themes on App.Onstart:

 

Set(varColorModes,
Table(
{Value: "Light", FntClr: "#000000", BtnClr: "#ced1e566", HvrClr: "#F7EDD044", BGClr:"#e6e7e9", Pics:"Light"},
{Value: "Dark", FntClr: "", BtnClr: "#4C4D5566", HvrClr: "#68BBE344", BGClr:"#000000", Pics:"Dark"},
{Value: "Red", FntClr: "#3B0918", BtnClr: "#B8390E66", HvrClr: "#DC473144", BGClr:"#FFF3D9", Pics:"Light"}
)
);

 

I also have code that will read from this and set new color variables in the OnChange property of my radio buttons in the app itself:

 

Set(varLighting,LookUp(varColorModes, Value = TMMC_Help_CMD.LightMODE, Value));
Set(varFntClr,LookUp(varColorModes, Value = TMMC_Help_CMD.LightMODE, FntClr));
Set(varBtnClr,LookUp(varColorModes, Value = TMMC_Help_CMD.LightMODE, BtnClr));
Set(varHvrClr,LookUp(varColorModes, Value = TMMC_Help_CMD.LightMODE, HvrClr));
Set(varBGClr,LookUp(varColorModes, Value = TMMC_Help_CMD.LightMODE, BGClr));
Set(varPics, LookUp(varColorModes, Value = TMMC_Help_CMD.LightMODE, Pics))

 

 

Default on my radio is the same as the toggle was: HELP_component.LightMODE(This is an output from the component and is changed when selecting the different buttons.)

 

As always, thank you for your assistance. Have a great day!

 

 

KRider_0-1660563923616.png

 

Categories:
  • KRider Profile Picture
    577 Super User 2024 Season 1 on at

    I found a solution. Not great but it works.

    I removed the radio buttons in the app and changed the save settings button to FIRST implement all of the color changes and then save. 

     

    The user doesn't get to see the theme in action first but this is my current work around. If any one else has an idea let me know.

  • Verified answer
    KRider Profile Picture
    577 Super User 2024 Season 1 on at

    Ok, so for anyone following here is what I have done.

    The Component library "Settings" popup window defaults colors to the users theme when it pops open. If the user selects a radio button for theme it gives a theme preview in the popup:

     

    KRider_0-1660660850391.png

    KRider_1-1660660863006.png

    Then when the user clicks save settings it logs the data into the list and refreshes the entire App with the new theme.

     

    This also gives a universal storage point for my theme settings. I can edit the themes in my component library and the options are distributed to the 4 apps our system operates.

     

    Again, I understand not many would look into doing this but it is possible for those who are curious  😄 

     

    Have a great day!

     

     

     

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Season of Sharing Community Challenge Winners!

Congratulations to our community stars!

Kudos to our 2025 Community Spotlight Honorees

Expanding mentorship, skilling, and AI innovation

Leaderboard > Power Apps

#1
11manish Profile Picture

11manish 360 Super User 2026 Season 2

#2
M Bilal Khan Profile Picture

M Bilal Khan 325

#3
Mohsin Ali Profile Picture

Mohsin Ali 232

Last 30 days Overall leaderboard