Color ramp HSV interpolation patch

I added a patch for adding HSV interpolation to the colour ramp - see https://developer.blender.org/D297

I can’t provide test builds but would appreciate any feedback or anyone willing to add the patch to a graphicall build.

Rainbow with two stops.


That’s a welcome addition to the ramp hope to see it soon.

Applied patch to my windows builds:

32bit - http://graphicall.org/1102
64bit - http://graphicall.org/1101

Thanks CoDEmanX. I’m having a hard time convincing the reviewers that there is much need for this patch.

I’d appreciate if anyone can provide any examples where they could find it useful.

any video to show how to use this and what it does
it might help

happy bl

I will find this useful. On my wish list: ramp with LAB color space interpolation.

I don’t have a video but here is an image showing the differences between HSV Nearest and RGB Linear. Please note that the labels on the first patch were wrong so in the test build you may need to select Farthest!!!


For some combinations there is not a huge difference. I haven’t labelled the ramps as HSV or RGB but they don’t always appear in the same order in this graphic.

I would imagine adding Lab would be just as easy.

A less cluttered approach could be to add “HSV” and possibly “LAB” to the list, and have a conditional enum to set a subtype (CW, CWW, nearest, farthest). So additional 2 + 4 options, better than 8 extra options in the main dropdown.


1 Like

are you trying to do sort of a color gradient here ?
can you show results on a plane may be !

thanks

absolutely awesome! :slight_smile: I would love to see it used in action and an example of how it is advantageous in a scenario

I’ve added some more color modes but the Ui is in need of some TLC. The colour picker is not designed for other colour spaces so at the moment the values have to be added manually. I’ve also added a steps parameter. Patch is not quite ready to uploaded but here is a screen shot.


Looks cool! Is it for Blender Internal only or is it for all Color Ramps? Like the one in the Node Editor?

Would there be possible to have presets of ramps? I did some colorramps, as gradient PNGs where I took the values from 380nm - 750nm visible spectrum. http://en.wikipedia.org/wiki/Visible_spectrum

the colors and what factor they should be in the ramp. Thinking about using it for fake refractions or maybe as a part of lensflares or glares.

It works for all ramps since the color band is effectively a fancy float to rgb converter. It works in cycles too. Preset saving is something I’ll add later.

Uploaded a new patch: https://developer.blender.org/D297

  • Added additional color modes such as HSV, HCL, LAB etc
  • Added a steps parameter
  • Added conditional enums for the different modes
  • LAB, XYZ, HCL color modes use different data storage due to limitations with rgb round trip
  • Output of ramp is always RGB
  • Added RNA for alpha, steps, colorinterpolation etc


Updated patch to trunk. Position and alpha have been changed to sliders.


Did you end up getting CIE-LCh Interpolation in?

Because the ramp works with RGB colour stops, I’ve limited the colour interpolation to just those colour models that can round trip to RGB. I have added a method to convert to HCL. The HCL model can give a pretty different ramp compared to RGB.

How about RYB, also in color pickers and HSV/HSL nodes (call it THSV/THSL for all I care :slight_smile: T for “Traditional”). That is, on the TH wheel, adding 0.5 always takes you to the traditional complementary. Currently adding 0.5 to blue takes you to yellow, the opposite Hue, rather than orange, the complimentary. Check out some online color scheme designer.

Disregard this if it feels completely ridiculous, just tossing a probably wild idea out there.

Hm, interesting… How come it looks right if light isn’t supposed to work that way?

I’d appreciate if anyone can provide any examples where they could find it useful.

This would be a VERY useful feature. I often need to express a bright range of hues in a ramp, but when using the existing color ramp, the in-between colors can get desaturated. HSV interpolation would prevent this from happening. Get it into trunk!