color_mode
Convert the sprite's color mode: rgba, grayscale, or indexed (every pixel snapped to the palette; dither 2/4/8 uses an ordered Bayer dither instead of nearest color). conform_only=true re-snaps all pixels to the current mode without converting (after editing the palette, say).
This record as markdown: /tools/pixmith-mcp/color-mode.md
What color_mode does on Pixmith
AI agents call color_mode as a supporting operation in Pixmith workflows.
| Parameter | Type | Required | Description |
|---|---|---|---|
doc | string | — | Document id (see doc_list); optional when only one document is open. |
mode | string | — | Target mode (required unless conform_only). |
dither | integer | — | indexed: 0 nearest color (default), or Bayer matrix size 2, 4, 8. |
conform_only | boolean | — | Only re-snap all pixels to the current mode. |
Parameters from the server's own tool schema.
Why color_mode is rated Low
Without any rule in front of it, every call an agent makes to color_mode happens silently: no trail, no cap, no way to know it misbehaved until something breaks downstream.
Risk signalsBulk/mass operation — affects multiple targets
Attacks that exploit this kind of access
The rule that runs color_mode safely
PolicyLayer is an MCP gateway: it sits between your AI agents and Pixmith, and checks every tool call against a rule you set before the call runs. Nothing changes on the server itself. For color_mode, this is the rule to start with:
color_mode gets a rate cap, and everything else on the server is denied unless you say otherwise.
The button opens the PolicyLayer dashboard: create your workspace, connect Pixmith, apply this rule, and every color_mode call is checked against it from then on.
Questions about color_mode
Convert the sprite's color mode: rgba, grayscale, or indexed (every pixel snapped to the palette; dither 2/4/8 uses an ordered Bayer dither instead of nearest color). conform_only=true re-snaps all pixels to the current mode without converting (after editing the palette, say). It is categorised as a Other tool in the Pixmith MCP Server, which means it performs auxiliary operations.
color_mode accepts 4 parameters: doc, mode, dither, conform_only. The full parameter table on this page comes from the server's own tool schema.
Register the Pixmith MCP server in PolicyLayer and add a rule for color_mode: allow, deny, rate-limit, or require approval. Point your MCP client at the PolicyLayer proxy URL and the rule is enforced on every call, before it reaches Pixmith. Nothing to install.
color_mode is a Other tool with low risk. Read-only tools are generally safe to allow by default.
Yes. Add a rate_limit block to the color_mode rule in your PolicyLayer policy. For example, setting max: 10 and window: 60 limits the tool to 10 calls per minute. Rate limits are tracked per agent session and reset automatically.
Set action: deny in the PolicyLayer policy for color_mode. The AI agent will receive a policy violation error and cannot call the tool. You can also include a reason field to explain why the tool is blocked.
color_mode is provided by the Pixmith MCP server (pixmith-mcp). PolicyLayer sits as a proxy in front of this server to enforce policies before tool calls reach the server.
More on Pixmith, and thousands of servers like it.
This server
Across the catalogue