Some time ago, I was looking for a way to create a color ramp for an XControl graph I was making. I needed a way to deal with the color ramp in more detail than the ramps that are already parts of some controls. I found the guts of this in an NI example and put together a small demo program.
The Choose Color Ramp.vi is a top-level program that can be run interactively to allow the user to define a color ramp suitable for his/her purpose. Run the VI, then change the number of colors, choose whether or not to pin the middle of the ramp to a third color (or just define it with two end-points), and choose each color. An example of the color ramp is shown below. If Apply is pressed, the information needed to generate that color ramp is sent out a cluster.
Open "Choose Color Ramp.vi".
Press the run button.
Play with the various controls to arrive at a color ramp that works for your situation.
Main Front Panel:
Main Block Diagram:
Nice! Could you add some documentation to your subVIs? It's kinda hard to follow what your logic is doing and why. This way others can see and read how the math works to creating the color ramp. Thanks!