Pixel Art Color Ramps: Hue Shifting and Shading Palettes
Make pixel art color ramps with hue shifting: cool shadows, warm light, even value steps and a greyscale test, then save .hex, .gpl and Godot 4 gradients.

You pick a good green for the grass, and now it needs a shadow. The quick way is the same green with black mixed in, and a highlight with white mixed in. On the sprite the shadow comes out grey olive, the highlight looks chalky, and next to your other colours the whole thing turns muddy. Do the same for skin, stone, water and wood, and you have twenty-five colours that don't look like they belong to one game.
Pixel artists fix this with color ramps: a short row of colours, darkest to lightest, for each material, where the hue turns as the value changes. By hand that means nudging hue, saturation and brightness on every swatch.
This guide covers how a shading ramp is built, the three rules that keep it clean, how to test it, and how to use the ramps in Godot 4. The Pixel Palette & Shading Ramp Maker rebuilds every ramp as you move a slider. You can try it here while you read.
What a color ramp is
A ramp is one material's colours in order, from shadow to light. The base colour, the one you would call "the grass green", sits in the middle, with its shadows below it and its light above.

A 16x16 sprite usually needs three to five steps per material: the deepest shadow or outline, a shadow, the base, a light and a shine. Bigger sprites and backgrounds use more. When every material is shaded the same way, the whole game looks lit by one light.
Three rules that keep a ramp clean
1. Even value steps
Value is how light or dark a colour is, apart from its hue. Each step of a ramp should be about as far from the next one as all the others. When two neighbours have nearly the same value they melt into one band on the sprite, and when one gap is much bigger, the form breaks right there.

A colour picker's numbers won't tell you. Pure yellow and pure blue both have a value of 100% in HSV, yet the yellow looks far lighter, so a ramp has to be judged by how light each colour looks.
2. Hue shifting
Light and shadow change a colour's hue, not only its brightness. The rule most pixel artists follow: shadows turn toward a cool hue, blue or purple, and highlights toward a warm one, yellow or orange. A green ramp then runs from blue-green shadows to yellow-green light.
The shift grows toward the ends of the ramp, and the base stays the colour you picked. Too little and the ramp looks flat and plastic; too much and the shadows look like another material. Greys need it too: a stone ramp of pure greys looks dead, while a slightly cool shadow and a slightly warm light make it look lit.
3. Saturation peaks in the midtones
The most colourful steps are the middle ones. Deep shadows have little light left to show colour, and near-white highlights have little room for it, so both ends lose saturation. A darkest step as saturated as the base glows in the shadows, and saturated highlights look like plastic. Saturation is a curve: highest around the base, lower toward both ends.
Test the ramp in greyscale
Hue can hide a bad ramp. Take the colour away and look at the greys:
- Each step should be its own grey, in order from dark to light, with even gaps.
- If two steps come out as the same grey, the sprite will look flat however good the hues are.
- If a hue-shifted shadow comes out lighter than the step above it, the shift went too far.
- On a whole sprite, the shape and the direction of the light should still read in grey.
Make the ramps in a minute
The Pixel Palette & Shading Ramp Maker does all of this in your browser. The lightness of each ramp is spaced the way the eye sees it, so every step reads as one even step darker or lighter.
- Pick the base colours. It opens with five: skin, grass, stone, water and wood. Click a base colour to change it, press Add a ramp for another material (up to 16), or Load a palette you already use: .hex, .gpl, .pal or a PNG strip. A loaded palette becomes A ramp from each colour, or you Keep them as one row.
- Set the ramps. Colours per ramp runs from 2 to 12, with the base in the middle. Contrast sets how far each ramp reaches toward black and white. Hue shift, from 0 to 60 degrees, turns the shadows cooler, toward blue, and the light warmer, toward yellow, the most at the ends. Saturation sets how colourful the ramps are, and a Saturation curve below zero keeps the middle richest. A near-grey base gets a cool shadow and a warm light by itself.
- See it on a sprite. Press Preview on a ramp and our sprites are shaded with it: the outline takes the darkest colour, the shine the lightest. Tick Greyscale check to see the ramps and sprites as values only.
- Fix colours by hand. Click any colour to set it yourself. It locks, and locked colours stay put when you move the sliders. While Saturation is at 100%, the base stays exactly the colour you picked.
- Download. Download everything (ZIP), or one file at a time: .hex, .gpl, PNG strip, PNG ramps or Godot .tres. Copy hex codes puts the palette on the clipboard.
The sliders set every ramp at once, so all your materials share one light and the same hue shift.
Every Gridwright asset pack, made to fit together, and all 44 tools for the fiddly work, with every new release, for $17 a month. Try it in your own game first: 3 days for $1 with every tool and up to 10 packs. Cancel any time.
Start: 3 days for $1 See everything it includesWhat is in the ZIP
- .hex: one colour a line, for Aseprite and Pixelorama.
- .gpl: one ramp a row, for GIMP, Aseprite and Krita.
- A PNG strip: every colour once, 1 px each, in one row.
- A PNG of the ramps: one ramp a row, 16 px a colour, to keep beside your canvas.
- A godot folder: a Godot 4 Gradient (.tres) per ramp, a hard band per colour.
- A README saying what each file is for.
Use the ramps in Godot 4
Each .tres is a Gradient with constant interpolation, darkest first: sample it anywhere from 0.0 to 1.0 and you get one of the ramp's own colours, never a blend.
In code, pick a shade by how lit something is:
extends Node2D
# One ramp's .tres from the ZIP's godot folder.
const GRASS: Gradient = preload("res://palettes/grass.tres")
func shade(light: float) -> Color:
# 0.0 = the deepest shadow, 1.0 = the brightest light
return GRASS.sample(clampf(light, 0.0, 1.0))
In a shader, one grey sprite can wear any ramp: it looks up each pixel's brightness in the ramp.
shader_type canvas_item;
// A GradientTexture1D whose Gradient is one ramp's .tres.
uniform sampler2D ramp : filter_nearest, repeat_disable;
void fragment() {
vec4 src = texture(TEXTURE, UV);
float value = dot(src.rgb, vec3(0.299, 0.587, 0.114));
COLOR = vec4(texture(ramp, vec2(value, 0.5)).rgb, src.a);
}
- Save it as
ramp.gdshader, give your Sprite2D a new ShaderMaterial in Material, and load the shader into it. - Under Shader Parameters, set Ramp to a New GradientTexture1D and load the ramp's .tres into its Gradient.
- Paint the sprite's greys in the middle of each band. A 5-colour ramp has five bands of 0.2, so #1a1a1a, #4d4d4d, #808080, #b3b3b3 and #e6e6e6 each land on their own colour.
Swap the Gradient for another ramp and the same sprite becomes another material, with no second drawing.
When a ramp looks wrong
- The shadows look like a different material. Lower the hue shift, or lock the darkest step closer to the base.
- The steps blur together on the sprite. Use 4 or 5 colours for a small sprite, or raise the contrast.
- The highlights glow. Move the saturation curve below zero.
- One ramp doesn't fit the others. Compare them in greyscale: its base is probably much lighter or darker than the rest.
FAQ
What is hue shifting in pixel art?
Changing a colour's hue as it gets darker or lighter, not only its brightness. Shadows move toward blue or purple and highlights toward yellow or orange, so the ramp looks lit instead of mixed with black and white.
How many colours should a shading ramp have?
Three to five for 16x16 and 32x32 sprites, more for big sprites and backgrounds. A few well-spaced steps read better at small sizes than many close ones.
Shade your next sprite with real ramps
Open the Pixel Palette & Shading Ramp Maker, put in your base colours and tick the greyscale check before you draw. For 16x16 sprites to build on, see Top-Down Characters, Pixel Monsters and the Top-Down Tileset. All are part of Gridwright: 44 tools and 150 asset packs, 3 days for $1, then $17 a month.
Every Gridwright asset pack, made to fit together, and all 44 tools for the fiddly work, with every new release, for $17 a month. Try it in your own game first: 3 days for $1 with every tool and up to 10 packs. Cancel any time.
Start: 3 days for $1 See everything it includes