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

We appreciate your patience as we improve our online experience.

LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

[LabVIEW Bug/Feature Report] Classic Color Ramp

Of course this is what it does, but then again, if you choose interpolate, you get the wrong effect.

Attached is the LV 2015 version.

0 Kudos
Message 11 of 13
(1,154 Views)

Thanks, that gave me a chance to play with your code and find out what I was thinking doesn't seem to work.

 

Honestly, I have never used the color ramp before.  And now that I've played with your VI, I don't think I had ever seen it before.  Being only in the classic palette where I very rarely go, I never paid attention to it.  It looked like something I was familiar with since it is a feature on intensity graph.  But I never realized it was its own control.

 

It seems like the the math behind the two modes of display keep them from working nicely with each other.  In interpolate mode, it puts the center point of the color at the particular index, and then progressively blends in the next color to either side.  So index 0 color is actually at 0.  Index 1 is actually at 1.   0.5 is half index 0 and half index 1.

 

But when you use the non-interpolate, it basically is in a round down to nearest integer mode.  So anything from 0 to .99999.... is index 0 color.  1 to 1.9999.. is index 1 color.  Exactly 2 is index 2 color.  But that is only 1 pixel tall at the top of the ramp and basically not visible.    (Show the digital display and type in 2, then the blue will show up.)  Interestingly, if you pick 2.1 or anything higher, it goes back to being index 1 color and does not stay at index 2 color.

 

I'm not sure where I would ever use a color ramp, but its behavior is very inconsistent and makes me never want to use it if I ever found a reason to.

0 Kudos
Message 12 of 13
(1,150 Views)

I find it very useful to emulate the Intensity Graph color ramp for other objects (such as the Vision Image Display, which doesn't come with one) or Pictures.

It clearly hasn't been updated since ages, which is why I brought NI's attention to it, as I find it useful and worthy of some fix (or replacement).

0 Kudos
Message 13 of 13
(1,147 Views)