apply_preset_palette
Apply a predefined color palette to an Aseprite file. Choose from classic palettes like gameboy, nes, or pico-8 to quickly modify pixel art colors.
Instructions
Apply a predefined palette to an Aseprite file.
Args: filename: Name of the Aseprite file to modify preset: Preset palette name. Options: gameboy, gameboy-pocket, nes, pico-8, cga, monochrome, sepia
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| filename | Yes | ||
| preset | Yes |
Implementation Reference
- aseprite_mcp/tools/palette.py:136-156 (handler)The handler function 'apply_preset_palette' which validates the preset name and calls 'create_palette' to update the Aseprite file.
async def apply_preset_palette( filename: str, preset: str ) -> str: """Apply a predefined palette to an Aseprite file. Args: filename: Name of the Aseprite file to modify preset: Preset palette name. Options: gameboy, gameboy-pocket, nes, pico-8, cga, monochrome, sepia """ try: preset_lower = preset.lower() if preset_lower not in PRESET_PALETTES: available = ", ".join(sorted(PRESET_PALETTES.keys())) raise ValidationError("preset", preset, f"Unknown preset. Available: {available}") colors = PRESET_PALETTES[preset_lower] return await create_palette(filename, colors, palette_name=preset) except Exception as e: return f"Failed to apply preset palette: {e}"