Python Forum
Modern version of XPM files
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Modern version of XPM files
#1
I want to make status indicator lamps for my Qt based GUI. The lamps will display a different image based on the value of the signal they monitor.

In the past I used .xpm files to define my lamp icons. XPM files have a color table that defines all the colors used in the icon. I allocated the first 9 colors in the table to be background, background highlight, background shadow, foreground, foreground highlight, foreground shadow, fill color, fill color highlight and fill color shadow. My icon class had methods for setting the background, foreground and fill color that used an algorithm to calculate the shadow and highlight versions of each color and modify the color table. With shadow and highlight colors it was easy to make a lamp with a bezel that matched the background, or to make a hot spot or a shadow in my lamp bulb.

I would like to do something similar with my new indicator lamps and am looking for graphics file formats where you can define "programmable colors". What file formats and Python packages should I investigate?
Reply


Messages In This Thread
Modern version of XPM files - by deanhystad - Apr-08-2021, 07:35 PM
RE: Modern version of XPM files - by BashBedlam - Apr-09-2021, 03:13 AM
RE: Modern version of XPM files - by deanhystad - Apr-09-2021, 03:55 AM
RE: Modern version of XPM files - by deanhystad - Apr-12-2021, 04:52 PM

Possibly Related Threads…
Thread Author Replies Views Last Post
  Modern looking GUI Cuz 14 74,147 Jan-11-2019, 09:30 PM
Last Post: Cuz

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020