From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.


Showing results for 
Search instead for 
Did you mean: 

lvoop class icon color

Go to solution

I'm confused, and think I must be missing a (simple?) detail somewhere.


I am trying to update the icons of all members of a lvoop class to a different color. Specifically, a shade of blue (in RGB = 0 - 96 - 128). However, I get a different shade of blue (in RGB = 0 - 102 - 153). I wonder the reason for this?


I've attached my example and below are the steps I followed.




  1. Create new class and name ClassIconColor.lvclass
  2. Right-click the class and Select New...VI and name the added VI
  3. save all to disk
  4. open and edit the icon
    • observed that NI_Library layer is green (R-G-B = 0-255-0) with black border (R-G-B = 0-0-0)
  5. close VI
  6. Open the class properties page and select Edit Icon...
    • observed that VI Icon layer is green (R-G-B = 0-255-0) with black border (R-G-B = 0-0-0)
  7. Add a blue (R-G-B = 0-96-128) stripe to the banner
  8. Click Okay to return to the class properties page
  9. Click Okay on the class properties page and asked to apply icon changes to member VIs
    • Click yes
  10. open and edit the icon
    • observed that the blue (R-G-B = 0-102-153) stripe to the banner has slightly different color, (R-G-B = 0-96-128) to (R-G-B = 0-102-153)
Thanks for your time - Chris
0 Kudos
Message 1 of 5
Accepted by topic author cbl-jnj



It is strange that the icon editor changes colors on you.  I was able to reproduce the color swap following your steps and while I do not know exactly why this is happening, I have a good idea.


Something strange is that even though the Icon Editor allows for 24-bit colors, the LabVIEW Block Diagram only uses 8-bit color.


My best guess is that you selected the color 0-96-128 in the Icon Editor, the closest you can get in the LabVIEW Block Diagram is 0-102-153.  This is not a definitive test, but I took your class and VI which told me that they had different color stripes and dropped them both in a new VI.  I took a snip of that and when I looked at it in paint, I noticed both stripes were the color 0-102-153.  It's pretty silly that the Editor allows you to choose from a 24-bit color palette but that is what I think is happening.

Matt J | National Instruments | CLA
Message 2 of 5

Yes, as Matt points out, LV uses a 256 colors palette for icons. This goes back a long way. The icon editor was written much much later and presumably the person writing it was either unaware of this when making the decision or (more likely) decided not to bother with wasting time on creating something which would conform and instead just let LV force the specific color on its own.

Try to take over the world!
0 Kudos
Message 3 of 5





Talk about a simple detail.


I used LabVIEW 4.1 (you know, back before LabVIEW had undo [think on that for a while!]) and I have this vague recollection of three icon choices, bw, grey or 8 - bit. I just assumed when they *improved* LabVIEW and removed these choices and gave a 24-bit color editor.......


Thanks for the insight, and for those who don't like clicking links here is the relevant note from the above link.


Note  The Icon Editor dialog box displays icons in 24-bit color. However, LabVIEW displays icons only in 8-bit color on the block diagram. Therefore, the icon you create in this dialog box might appear slightly different from the corresponding icon on the block diagram.



Thanks for your time - Chris
0 Kudos
Message 4 of 5

@cbl-amo wrote:
I just assumed when they *improved* LabVIEW and removed these choices and gave a 24-bit color editor.......

I would say that they probably made the right decision. As you mentioned, the icons in LV go way back, and that means that the code for displaying them goes way back (quite probably all the way back to first color version in the early 90's). Changing that could potentially be complicated relative to the gain you would get (we don't actually *need* all those colors and there are other things to work on).


The icon editor, however, was another matter, because that's something that it would be useful to change. The current editor is fully written in LV itself (early versions shipped as open source. Today it's a packed library and you will have to look for the source elsewhere on this site) and it encodes all of the new data outside of the classic icon resources of the VI.

Try to take over the world!
0 Kudos
Message 5 of 5