genart.dev
MCP ToolsArtist & Critique

extract_palette

Return reference image for color extraction.

Input Schema

ParameterTypeRequiredDescription
referenceIdstringYesID of the reference to extract colors from.
seriesIdstringNoID of the series the reference belongs to.
sketchIdstringNoID of the sketch the reference is attached to.
countnumberNoNumber of dominant colors to extract. Default: 6.

Output Shape

{
  "referenceId": "ref-hk4701",
  "preview": "<base64 image>",
  "palette": [
    { "hex": "#D4A017", "rgb": [212, 160, 23], "percentage": 28.4 },
    { "hex": "#E87530", "rgb": [232, 117, 48], "percentage": 22.1 }
  ]
}

Side Effects

  • Generates a preview image of the reference for visual context.

Error Cases

ErrorCause
Reference not foundThe provided referenceId does not match any stored reference.
Series not foundThe provided seriesId does not match any existing series.
Sketch not foundThe provided sketchId does not match any saved sketch.
Invalid countThe count value is not a positive integer.

Golden Path Example

Request

{
  "referenceId": "ref-hk4701",
  "count": 4
}

Response

{
  "referenceId": "ref-hk4701",
  "preview": "<base64 image>",
  "palette": [
    { "hex": "#D4A017", "rgb": [212, 160, 23], "percentage": 34.2 },
    { "hex": "#E87530", "rgb": [232, 117, 48], "percentage": 26.8 },
    { "hex": "#3B5998", "rgb": [59, 89, 152], "percentage": 21.5 },
    { "hex": "#F5F0E1", "rgb": [245, 240, 225], "percentage": 17.5 }
  ]
}