Multiple Color Palettes in G4P?

This is a question for Peter, and odd one.

After getting beta feedback from the app I made with your amazing library, some users asked for a way to edit colors.

While this is something I can do theoretically, there’s not enough colors available in G4P to do this - I’d need many sets of color palettes.

So, again, an odd request, probably not one you ever considered, but is there a way to have multiple gui palette files? Could I, on the fly, select any given gui palette somehow?

I would not be surprised if the answer is no, but I wanted to ask your thoughts.

Thank you so much again for all you’ve done for me, and for all of us, with G4P. It’s a wonderful achievement.

Mike

By that I assume that they would like to change the overall GUI colour scheme rather than individual elements that make up a control. Allowing users to change the colours used by different elements of a control in your app is definitely not recommended.

G4P has support for 16 colour schemes of which 8 are predefined but even these can be redefined so you could provided the user with 16 custom schemes to choose from That seems a goodly number :grinning:.

The process is quite simple but a bit tedious to create an aesthetically pleasing scheme. The process is described on my website here.

Once you have created your 16 schemes the statement

G4P.setGlobalColorScheme(schemeNbr(;
// where `schemeNbr` in in the range 0 to 15

will change the colour scheme used by every control in your app.

3 Likes

Yes, as I thought.

The device I made the app for has 32 color sets. 32 x 16. He wanted me to change the color of the screen and text to match the device.

I told the user there was a limit to the colors available.

No worries - this is not even something I would expect or suggest you implement, and it’s an odd one.

I may be able to cheat and do a little workaround, but I had never intended to implement the feature the user requested.

And I probably won’t even try.

Many thanks :pray: Peter!!

Mike