Color Ramp
Recolors a texture by mapping one of its channels onto a gradient between two colors.
Outputs
| Name | Type | Description |
|---|---|---|
| Texture Output | Texture | The recolored texture. |
Inputs
| Name | Type | Description |
|---|---|---|
| Texture Input | Texture | The texture whose channel drives the gradient. |
Parameters
| Name | Type | Description |
|---|---|---|
| Output Format | Enum | Whether the output takes the size and type of the input or uses the settings below.Choices: Copy Input, Manual |
| Texture Type | Enum | The channels of the output texture. Follows the input unless the output format is Manual.Choices: R (u8), RG (u8), RGBA (u8) |
| Texture Size | Vector 2 Int | The size of the output texture in pixels. Follows the input unless the output format is Manual. |
| Channel | Enum | Which channel of the input picks the position on the gradient.Choices: Red, Green, Blue, Alpha |
| Color Space | Enum | The color space the gradient is blended in, which changes the colors in between.Choices: RGB, HSV, HSL, OKLab |
| Color A | Color | The color where the channel is 0. |
| Color B | Color | The color where the channel is 1. |
Color Ramp paints a texture with a gradient. For every pixel it reads one channel of the input and uses the value as a position between two colors: 0 gives Color A, 1 gives Color B and anything in between gives a mix. A gray texture from Noise or Sine Wave becomes a colored one this way, and a black-to-white gradient becomes any two-color gradient.
The color space decides what the colors between the two ends look like. RGB blends the numbers directly, which can pass through dull grays between two bright colors. HSV and HSL blend around the color wheel, taking the shorter way around, so a blend from red to blue goes through purple. OKLab blends the way the eye sees it, with even steps in lightness and no dull middle, and is the best choice for most gradients. The alpha of the two colors is always blended in a straight line.
Keywords: gradient, colorize, tint, map, palette, lut, heat map