Change Palettes on the Fly
jjames
Posts: 2,908
Is there any way to change the color palette of a TP on the fly? Does the TP load all the palettes and then selects the active one? Or is the only way to accomplish this to have basically two panels in one? And switch between themes? Has anyone done this for clients who want to be able to change templates/palette colors on the fly?
0
Comments
I have several projects using this feature now, all based on the Panel Designer template Aluminum Smoke. I plan to modify some other designs to work the same way when I get the time; that's the only such template that incorporates this so far. It's a fair amount of work, switching all the color references to a standard palette index, but I feel it will be worth it in the end.
I suspect object properties are not stored that way in the panel, and palettes are strictly a TPD4 convention. Each color is most likely a raw RGB value per object, and TPD4 simply references the paleette to send the data to the panel; it doesn't send the palette itself. I say this because there is no palette resource that you can choose from. So the only way to do it on-the-fly with a running panel would be to individually set each page and button property - not terribly practical.
Not really - it's just that it'd be such a pain in the rear to change all those properties if the customer wanted several color "palettes" on his TP.
One last thing - I've been trying to figure out the darn emoticons / smilies that you can use in mid-post. I came across this link, but they don't seem to work.
http://www.vbulletin.org/forum/misc.php?do=showsmilies
:banana:
http://www.amxforums.com/misc.php?do=showsmilies
Thanks!
:eek:
I love the Smiley Xtra extension to Firefox, too bad it seems to have evaporated. It won't update anymore, so I imagine when the links go bad, they are gone unless you host your own.
Edit: also too bad this version of the forums won't do in-line images, but makes them links intead...
Do not feel awkward if you want a feature request. We need to know what it is that you guys want and can sell. The more you say what you want the more likely AMX is to make it.
My company and I want new keypads. Preferably something similiar to the DMS keypads, but IP based with an updated look. Also, some sort of remote control that is 802.11b/g compatible. I'm sure there are a few other desires we have, but I think I will just create a new thread specifically for product requests
Jeff
Jeff
Has anyone worked with the chameleon buttons? Could this do what you want to do?
Now that would be Great! I would like to see that.
Paul
In the top left section, you see the unaltered PNG files as they are without any changes being applied. These are the graphics that are being used in the right side sections. In the right sections, in each row, all of the buttons are identical in every way except the draw order and each column has the same draw order throughout the column. The top right section uses RGB values for the colors, so they will not change when the palette is changed. The lower right section uses indexed values and they will change as the palette changes. (I included 3 different palettes to play with, or create your own palette ) This allows you to create buttons that will have the same color no matter what palette choice is selected without having to create a seperate graphic file for each button.
Finally, the lower left section is just to demonstrate how a chameleon image is transformed. The Red is replaced with Black (Fill Color), the Green is replaced with White(Border Color) and the blue and black sections are treated as transparent. The interesting thing is the (small) Yellow section. The Yellow (which contains both Red and Green) is the color of the later colors in the draw order. If you draw fill, then border, the Yellow appears White. If you draw border, then fill, the Yellow appears Black. This also applies to the Gradient portion of the button where there is both a Red and a Green value on the pixel. If you switch the fill and border positions in the draw order, you will observe dramatic changes in the appearance of the gradient. This is demonstrated in the right side sections in the first and second columns.
There is also some transparency being introduced in the gradient. This is why the three rows in each section look different. The shadow images in the top left section are used in the order they appear in each corresponding row of the top and bottom right sections. As you can see, a transparent center to the button on the shadow image allows the brown background to enter the gradient (this could be a good thing). By filling in the section of the button handled by the chameleon image with a White fill, the gradient appears lighter and brighter. By filling in with black, the gradient appears darker and more dim. If you are using anything other than a solid background, I am inclined to reason that using a white or black fill will provide a more uniform appearance to the buttons.
While setting up a panel with these buttons requires a little more design and work, quickly customizing a panel to the color scheme of the room it is in becomes easy. If there was ever a change to allow palette changes on the fly, panels could change to match the room being controlled, based on the season or holiday, according to current security status, according to the time remaining for the current meeting, ... basically any event without major overhead on the processor (not sure what kind of overhead would be involved on the touchpanels).
I still need to send this design to actual touchpanels to see if everything holds true in the touchpanel, but I think it will be close.
Jeff
Of course this was for a small system which makes it some what more managable and I only changed main panel pages and pop ups. Module specific Pop Ups with module specific graphics and themes weren't affected. You just change want you want.