LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

How to create color constant or an array of colors?

Solved!
Go to solution

How does one create an array of colors? Is this similar to creating an array of strings or an array of numbers?

How would one create a color constant? For example, for my XY Graph, I went to create -> property node -> BG Color,

and changed this to write. But now I need to wire a "color constant" to this property. I don't know how to do that.

0 Kudos
Message 1 of 11
(6,911 Views)

Yes creating a color constant is similar to the String and numeric array Just pull a color constant and place it inside an array. Just take a color constant and wire it what is the problem?

-----

The best solution is the one you find it by yourself
0 Kudos
Message 2 of 11
(6,904 Views)
Solution
Accepted by murchak

On your front panel, drop an array control.

 

From the numeric pallette, drop a framed colour box control.

 

Drag the colour box into the array.

 

On the block diagram, right click the array and change to constant.

Message 3 of 11
(6,903 Views)

@murchak wrote:

How does one create an array of colors? Is this similar to creating an array of strings or an array of numbers?

 


Yes.

 


murchak wrote:

How would one create a color constant?


The color box constant has been moved around into different palettes over the years so only real expert know how to find it Smiley Very Happy

But you could also use "QuickDrop" to find it 😉

 

In LV 2010 here's where to find the color box contant :

color box.png

And in the control palette, you find the color box in the "numeric" subpalette.

 

In terms of data type, the is no "color" data type, it's a U32, that's why when you create a constant or control or indicator from the node BG color you get a numeric, there might be an idea to change that in the LabVIEW Idea Exchange, I'm not sure...

 

Hope this help


We have two ears and one mouth so that we can listen twice as much as we speak.

Epictetus

Antoine Chalons

Message 4 of 11
(6,901 Views)

So that's where it is on the block diagrams!! I could never find it. Whereas I knew it was a numeric on the front panel.

 

That's even easier then.

0 Kudos
Message 5 of 11
(6,899 Views)

@sebster wrote:

So that's where it is on the block diagrams!! I could never find it. Whereas I knew it was a numeric on the front panel.

 

That's even easier then.


Ha.. One more tip you can search for the color constant in the search option instead of posting in the Forum 😄

-----

The best solution is the one you find it by yourself
Message 6 of 11
(6,897 Views)

P Anand wrote:

Ha.. One more tip you can search for the color constant in the search option instead of posting in the Forum 😄


Yes but he wouldn't get all the useful tips if he did a search Smiley Wink


We have two ears and one mouth so that we can listen twice as much as we speak.

Epictetus

Antoine Chalons

Message 7 of 11
(6,894 Views)

Ya I know he can't search for a solution there but atleast he can get the color constant. Smiley Wink

-----

The best solution is the one you find it by yourself
0 Kudos
Message 8 of 11
(6,891 Views)

Thank you to all that replied and helped me with this.

 

Anand,

 

Thanks for the tip. I will try to remember to search for things in the LabVIEW help documents first. The fact that I didn't, highlights the difference between a novice and an expert. 

I used to tutor students in physics and I always wondered why they didn't try this or that, then one day I realized that they were simply not familiar enough with the subject matter

to independently think of all the little things that I would think about first when tackling a physics problem. They simply were not experienced enough to reach for a standard bag

of tricks, and always sought help from a TA first. Experience is a great thing indeed.

0 Kudos
Message 9 of 11
(6,879 Views)

Yes True. Also LV help has improved a lot more in 2011 version. Just tried to make life easy. Good luck

-----

The best solution is the one you find it by yourself
0 Kudos
Message 10 of 11
(6,875 Views)