# Source code of the color ramp node [closed]

I'm not savy with browsing Blenders source code. For another purpose I'm interested in the source code of the color ramp node.

Not the UI stuff of it, just the "math" behind it, the "take in everything, from a single number up to a complete bitmap, and remap those values according to the sliders count, color and position".

Anyone that's into Blenders source code can help me out and post the code of the color ramp node? Or maybe directions so I can find it myself?

Thanks.

## closed as off-topic by someonewithpc, Ray Mairlot, cegaton, stacker, X-27 the fluffy unicornJan 3 '16 at 18:52

• This question does not appear to be about Blender within the scope defined in the help center.
If this question can be reworded to fit the rules in the help center, please edit the question.

• I'm voting to close this question as off-topic because it's about Blender's source code. – someonewithpc Jan 3 '16 at 15:27
• If you're using Gnu/Linux or some other Unix version, you can just use the command grep. For instance, grep -r 'colorRamp' .. In windows there's findstr – someonewithpc Jan 3 '16 at 15:31

The code you're looking for is here on line 322 (the do_colorband function).