Custom Named Colors in Vision?

I may not be looking with the right search terms, but I’m having a hard time finding the best practice for storing a set of custom colors by name to be able to use them project wide across my vision screens.

How can I best setup and store definitions such that I can tell my project that OD_BG1 is #002b36 and then be able to set object color properties in Vision to be OD_BG1 and have them show that hex code?

We’re going to be releasing a module in the next couple months that does exactly this!

It’ll support defining named colors (tokens), which can have a unique value for a given theme. There can be multiple themes for a project which can be swapped on the fly. A theme is a collection of color ramps organized to form a palette.

Tokens can either reference palette colors from a theme, or can reference other tokens (with optional palette or key shifts) in order to create a hierarchy.

And thanks to caching/avoiding Jython interpretation performance is much better than client tag/script module color storage options.

Stay tuned for more info, there should be a public beta coming soon!


In the meantime…

You can make a 2-column dataset memory tag

Put a custom property on the component (My example uses ‘colorName’)
Bind the component colors using a lookup expression.:

               {Root Container.Rectangle.colorName},

Thanks Jordan, that makes a lot of sense. What’s my best bet for being able to centrally create and manage that memory tag? Can I stick the datasets somewhere in an inheritable project so that I can use this across projects and gateways?

If it’s in a tag, it will already be global.

@bmusson Looking forward to seeing what you’ve got.

EDIT: The obvious exception to this is if you put it in a client tag.

@JordanCClark Some screenshots to build hype :wink: (Also, I'm a big fan of the Mineral UI design system)

So for general timeline: the design interface for tokens (including relative references with the common [.] syntax) is the only thing that needs wrapped up before the beta. Then between the beta and the full release I'd like to implement a "Theme Browser" for drag/drog designing in Vision.