[Feature] Color management in Vision

Perspective will enable to use style. That’s great

For Vision, it will be very convenient if we can declare a global Map of Color in the client scope, with the possibility to use it directly in component binding (and a script function to read/write the map color value for a key).
With a color picker to edit key/value of the map.
And a map of Font…

We often use String tag client with color coded in string but it’s not handy to edit the color and or the expression binding in component (toColor(myStringColorTag))

Hi Lionel,

We store colours in client tags with a descriptive name mapped to the RGB definition of the colour e.g. [Client]Colours/Medium Grey = ‘151,151,151’. You can then assign this to an object by binding the relevant property (e.g. Stroke paint) directly to the tag, which is quick and more convenient than using an expression. It is also easy to see what the colour should be when you look at the binding.

Any changes to the colour definition will then be used throughout the project.

While this may happen down the road, @AlThePal’s suggestion is definitely a good workaround for now.

@AlThePal
Yes we sometimes use such of workaround, but for color or font in tempate, I hesitate to add binding to client tag especially when the template has many instances (100+) on a windows, I fear all these binding will degrade perfomance for the windows loading tmes…

I know this is an old topic but I'm curious what the best practice for something like this is? I too would like to use memory tags in the gateway to be able to universally change color schemes for backgrounds of buttons etc.

Would placing those memory tags at the gateway level and then making reference tags in my UDTs be unnecessary? This felt like a good compromise because it would allow the changing of colors for individual templates udt instances by simply changing that reference tags path.

Hi, It depends on what usecases you want to cover

  • Do you really want individual udt instances to have different schemes on connected templates and windows?
  • Do you want individual vision clients to have different schemes? Fex daylight-theme in public area and dark-theme in control room based on operator preferences

I need the latter, and implement this with a combination of global tags and client tags:

  • I organize memory string tags in folders for night- and day-theme (fex text_fg, text_bg)
  • I keep one set of such theme-tags in client scope
  • I reference the client tags anywhere relevant
  • I use a script to update values in the client tags based on what theme the operator wants in his vision client.
1 Like