auto_shade
Shades flat pixel-art colors into lit forms from a chosen light angle, adding highlights and shadows while leaving outlines and tiny details untouched.
Instructions
Shade flat colours into lit forms from one light direction.
Draw the flats first (each material one colour, optionally a dark
outline), then run this. For each flat colour it builds a hue-shifted
ramp (or uses yours), estimates the 3D form from the silhouette and the
colour areas, and paints highlight, base, shadow and deep shadow
clusters lit from light_angle. Outline colours are detected and left
alone; tiny areas (eyes, buttons) are kept as they are.
Then: view_quality to judge it, critique_sprite, and hand-fix clusters with draw_rows. A checkpoint is saved first so restore_checkpoint undoes it.
Args: filename: Aseprite file layer_name: Image layer with the flats ("" = topmost) frames: "" = every frame (consistent light across an animation) light_angle: Where the light comes from, degrees: 90 = top, 135 = top-left (the classic), 45 = top-right, 180 = left shadow_steps: Shadow shades below the base colour, 1-3 highlight_steps: Highlight shades above the base, 0-2 contrast: 0.6 (soft, overcast) to 1.8 (harsh, dramatic) form: "mixed" (default: whole body plus each part), "silhouette" (one volume, best for simple shapes), "region" (each colour area rounded) ambient_occlusion: Contact shadow where one part overlaps another rim_light_color: Hex colour for a thin back-light on the shadow-side edge dither: Checkerboard the boundaries between shades (only for 48 px+) use_sprite_palette: Snap all shades to the sprite's current palette ramps: Your own ramps, {"#base": ["#dark", ..., "#base", ..., "#light"]} hue_shift: Degrees the hue turns per shade step (0 = none, 9 = subtle default, 15+ = stylised: shadows clearly cooler, lights warmer) output_layer: Write the shaded result to this layer instead of in place checkpoint: Save a checkpoint first
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"filename": "<filename>"
},
"name": "auto_shade"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| form | No | mixed | |
| ramps | No | ||
| dither | No | ||
| frames | No | ||
| contrast | No | ||
| filename | Yes | ||
| hue_shift | No | ||
| checkpoint | No | ||
| layer_name | No | ||
| light_angle | No | ||
| output_layer | No | ||
| shadow_steps | No | ||
| highlight_steps | No | ||
| rim_light_color | No | ||
| ambient_occlusion | No | ||
| use_sprite_palette | No |