Dynamically changing image colors

I’d like to show my compressor changing color with the DB value “N_convey1” as in my other post. 0 = red, 1 = green, 2 = yellow, 3 = red. The compressor is an image. Do I need to swap images or can I tie it into one of the color properties?

Images have a property called a “Tint Color” that is exactly for this purpose.
When turned on, the tint color does just that to the original image - applies a color tint to it. For the tint color to work well, the original image should be a greyscale image.

You simply turn on tinting on the image, and then bind the tint color to a dynamic property that holds your conveyor status. Just set up the color mapping table to the tint colors of your liking.

You might also want to look into the color replace properties, which can be set up to replace all pixels of one color in an image with another. This is usefull for an image of a machine with an animated “status light” on it.

Hope this helps,

can you add a little more flesh to this?

thanks

This video shows how colors work, and the ones below show binding and expressions. Just use the Tint Color property that Carl was referring to. They’re a little bit dated, in that they refer to FactoryPMI instead of Ignition. The concepts and techniques remain current.

Properties Binding and Expressions Volume 1
Properties Binding and Expressions Volume 2
Properties Binding and Expressions Volume 3
Properties Binding and Expressions Volume 4
Properties Binding and Expressions Volume 5

1 Like