Color datatype for tags

It’s starting to look like it would be immensely useful to hold some palette information in some tags. And before we jump on the template bandwagon, what we’re trying to do is not really possible using templates.

What exactly are you trying to accomplish?

I’ve seen style information stored database-side which makes central style control pretty easy. Maybe that would work for you?

[quote=“michael.stofan”]What exactly are you trying to accomplish?

I’ve seen style information stored database-side which makes central style control pretty easy. Maybe that would work for you?[/quote]

I agree, and that’s what ended up getting implemented, but I’d still like to see a datatype for color that encapsulates an RGBA value and/or a gradient directly. It’d be nice to avoid the whole process of putting a script that does toColor(tag("path/to/the/colorstring") and instead just directly bind a color property directly to a tag.

I am running into the same restrictions in my projects as well.
If I design a component that has properties which change fill colors and after I draw everything up in this format if people want me to change those colors…I’d have to redo my project.
EDIT:
I am looking into this right now because I can see that for my components, I’m using different layers that are fill painted to a specific color and then simply toggling their visability but… If I could bind their fill paint to a tag, I could make design changes to my projects in 1/10000000000th of the time.

This seems to be taken care of with templates in version 7.4+. You can just change the colors in the templates and all of the instances of templates will reflect the change. You can add another layer of versatility, like michael.stofan has mentioned, by having the templates refer to a set of memory tags to get their color convention. So rather than having a template object hard-codded with RED for ON/OPEN and GREEN for OFF/CLOSED, use integer memory tags called “COLORS/ON_OPEN_COLOR” and “COLORS/OFF_CLOSED_COLOR” and have the template object reference those tags. That way you can use exactly the same template objects across projects with different color conventions.

“I’m using different layers that are fill painted to a specific color and then simply toggling their visability …”

Just my opinion, but I find visibility to be a troublesome method to animate most graphical objects. It’s often difficult to see, literally, the animation algorithm that is used when layered visibility animation is employed. It’s fine when you really want an object to appear on a true condition and vanish on a false condition. But placing 2 labels on top of each other, where one says “Running” and the other says “Stopped”, is better done with a single label component and an expression binding.

[quote=“jay”]This seems to be taken care of with templates in version 7.4+. You can just change the colors in the templates and all of the instances of templates will reflect the change. You can add another layer of versatility, like michael.stofan has mentioned, by having the templates refer to a set of memory tags to get their color convention. So rather than having a template object hard-codded with RED for ON/OPEN and GREEN for OFF/CLOSED, use integer memory tags called “COLORS/ON_OPEN_COLOR” and “COLORS/OFF_CLOSED_COLOR” and have the template object reference those tags. That way you can use exactly the same template objects across projects with different color conventions.
[/quote]

… thereby creating a color tag that you still need to use toColor() on. Templates are not the one-size-fits-all solution many people make them out to be. Tags directly describing an RGBA value or gradient would be another extremely useful tool we could put to good use.

[quote=“Greg.Buehler”]
… thereby creating a color tag that you still need to use toColor() on. Templates are not the one-size-fits-all solution many people make them out to be. Tags directly describing an RGBA value or gradient would be another extremely useful tool we could put to good use.[/quote]

I took a second look at this and discovered that I can store a hexidecimal color representation as a string in a memory tag and bind it to a fill property to accomplish what I wanted (almost)
I still would like to see an actual color tag though since color coding seems to always be changing once management reviews a project and probably even more later on.