05-11-2012 11:15 AM
yes my array has only 4096 colors only that i need to re arrange such that it looks like the 24 bit color bar.meaning the location of 12 bit color correspondig to 24 bit space
the correct arrangement/indexing is my question
05-11-2012 11:49 AM
here you can see the 12 bit colors arranged sequentially which produces alternating blue shades since red values go down
the last palatte to right of parrots tail shows the palatte rearranged in color group, that is what i wish to create, re arranging them in LV
-help
05-11-2012 11:54 AM
freemason,
You're probably way past this by now, but here goes.
"does the 12 bit color bar has actual 4096 colors or is it just a visual copy of the 24 bit values. im confused."
Prior to runnning the Convert Picture 24-to-12-bit.vi, the control and indicator have the exact same appearance (I just made a copy and converted it to an indicator). However, once you run the VI you may be able to see the difference. It is subtle, since 4096 is still a lot of colors, and depending on your display settings may not be easily visible. This VI has one subVI, Unflatten Pixmap-JJ.vi, that was available in my earlier post.
Just for reference, here's a little graphic showing the gradient differences.
Good luck with your project.
James
05-11-2012 12:05 PM
Thanks James,
http://www.colortools.net/color_picker_extended.html
here is another link i found that does what i currently have, for better explanation, but i still need to arrange like the one i mentioned before with the same functionality,
in the labview color bar if i scan from left to right i would get a 2d array that represents the colors as seen in the bar, if i just give 0-16million number in order i get this alternating blues since they are arranged in such a way.
hope some one has a clean method to rearrange.
05-12-2012 01:04 PM
@freemason wrote:
i could search in the 24 bit array (16.7 million) to find the location of the 12 bit values and then place accordingly but i think its crude,
I have no idea what logic is used to create the order of the colors, so I don't have any better suggestion. If you don't need to generate this yourself, just do what I did in the original example I linked to - copy the palette you liked from Wikipedia and use that directly.