LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Is there any way to limit number of colors used on a Solaris Labview application?

I am operating my Solaris workstation in 256-color mode, and my Labview application requires around 130 of those colors. If I launch several other applications concurrently with the labview, the palette runs out, and the Labview application will force all others to grey-out. Even though Labview reserves 130 colors from the palette, I would be surprised if it uses more that about 20 or 30 colors. Is there any way to limit the number of colors from the palette that labview has access to?
0 Kudos
Message 1 of 6
(3,274 Views)
> I am operating my Solaris workstation in 256-color mode, and my
> Labview application requires around 130 of those colors. If I launch
> several other applications concurrently with the labview, the palette
> runs out, and the Labview application will force all others to

The choices are between a 6x6x6 spectrum and a 5x5x5 spectrum. It
sounds like you are already running with less colors. I can't be 100%
sure anymore, but I think that the colors LV allocates are still
available for sharing. LV doesn't animate the colors, so they should be
freely sharable as long as the other app wants to share.

I'm afraid that LV doesn't have an even lower color mode. It reserves
these colors for any and all VIs that it opens.

Greg McKaskle
Message 2 of 6
(3,274 Views)
Thanks for the info. Just a little additional info from my end:

It appears that things work ok if Labview is launched first and reserves its 130 colors from the default palette. The problem seems to be when other applications are launched first and then Labview.

If there are less than 130 colors left on the palette when the Labview application is launched, then the number of colors on the palette does not decrease, and the other applications grey-out when Labview is in focus. My speculation here is that Labview is opening a private palette (thus the reason the default palette color count doesn't decrease), causing other applications to grey out when this private palette is active.

Is there any way to force Labview to use the default palette, even
when there are insufficient unique colors available in the palette. Otherwise it seems there is no way to overcome this problem.

Thanks,
Rod Rippey
0 Kudos
Message 3 of 6
(3,274 Views)
....
> Is there any way to force Labview to use the default palette, even
> when there are insufficient unique colors available in the palette.

Not without changes to the LV source code. I believe that LV tries to
allocate the 5x5x5 color cube using shared colors. Unfortunately, if
the colors do not match close enough, then the color allocations will
start to fail. At that point the colors are freed and LV resorts to
using a private color table. Without changing LV source to try another
scheme, this how it works. There might be one other option, but that is
to force LV to be black and white. Problem is, I'm not sure this option
was fully completed.

Greg McKaskle
0 Kudos
Message 4 of 6
(3,274 Views)
Hopefully just one further question:
Does Labview use RGB values or named colors?
Thanks,
Rod Rippey
0 Kudos
Message 5 of 6
(3,274 Views)
> Hopefully just one further question:
> Does Labview use RGB values or named colors?

RGB. The larger color palette is pretty much HTML color palette. They
go from 0 to 255 along each edge of the color cube by 51, giving 216
evenly spaced RGB points. Then it makes one more pass to get 5 more
grays inbetween the 6 already there.

If using the lower colors, it does the same grid but with four
increments of 64 I think. It then adds four additional grays between
the other five.

Greg McKaskle
0 Kudos
Message 6 of 6
(3,274 Views)