Gamedev Quick Tools

Gradient ramp maker

Build a ramp texture for a shader from colour stops with alpha: a smooth gradient or stepped toon bands, blended in sRGB or linear, up to 8 ramps stacked in one PNG.

Ramps

Ramps, up to 8 (one row of the PNG each)

    Stops

    Preview

    Export

    How the gradient ramp maker works

    • Each row of the PNG is one ramp. Pick a row in Ramps, then edit its stops: drag a marker or use Position (%), and set its Colour and Alpha (0–255). Click or tap the bar to add a stop there.
    • With a marker focused, Left and Right move it by 1% (Shift: 10%) and Delete removes it.
    • Smooth blends between stops. Stepped keeps each stop’s colour until the next stop, for toon bands.
    • Interpolation sRGB blends the stored values; Linear blends light. Alpha is always blended as stored.
    • Each pixel takes the colour at its centre, (x + 0.5) / width, which is where a shader’s texture lookup lands.
    • Undo with Ctrl+Z and redo with Ctrl+Y or Ctrl+Shift+Z, or use Undo and Redo. Copy link gives an address that opens these ramps. Your ramps stay while you move between tools in this tab.

    Questions

    Which import settings does a ramp texture need?

    Turn sRGB on for colour ramps and off for ramps that hold data such as masks. Use Clamp so the ends don’t wrap into each other, Point (nearest) filtering for stepped ramps so the bands stay sharp, and no mipmaps for stacked rows, since smaller mips blend neighbouring rows. In Unity these are sRGB (Color Texture), Wrap Mode Clamp, Filter Mode Point (no filter) and Generate Mipmap off. In Godot set them on the shader’s sampler2D uniform with source_color, repeat_disable and filter_nearest, and import the PNG with Compress Mode Lossless.

    How do I sample one row of a stacked ramp?

    Use your value from 0 to 1 as U and the row’s V centre from the table under the preview, (row − 0.5) / rows from the top of the image. If your engine counts V from the bottom, use 1 − V.

    Should I blend in sRGB or linear?

    Pick the one your gradient editor uses if the texture should match it: Godot’s Gradient, for example, has an interpolation colour space setting with sRGB and Linear sRGB. sRGB is what most image editors do; Linear gives brighter, more even blends between dark and light colours: the middle of black and white is 188 instead of 128.