{
  "title": "Replace image color",
  "human_url": "https://happytails.ai/en/image-tools/image-color-replacement/",
  "agent_url": "https://happytails.ai/agents/en/image-tools/image-color-replacement/",
  "language": "en",
  "markdown_url": "https://happytails.ai/en/image-tools/image-color-replacement.md",
  "content": "Replace image color\nReplace one color in an image while keeping transparency. Adjust tolerance and download the edited PNG and selection mask.\nHow can we improve this tool?\nReport a problem or share an idea.\nPlease leave out private information. Your message and the tool name go to our team via PostHog.\nHow to use Replace image color\nChoose a still PNG, JPEG or WebP image.\nSelect the source color, replacement color and tolerance.\nRun the tool, compare the original and result, and download the PNG, selection mask or report.\nUseful next steps\nImage to ASCII art\nCompress image\nSee exactly what changed\nThe selection mask is white where a pixel matched and black everywhere else. Tolerance uses RGB distance. It is a hard threshold, not a feathered selection.\nKeep transparency\nThe replacement preserves the decoded alpha channel. Fully transparent pixels are skipped unless you include them. Browser decoding can change hidden RGB values and color profiles; original metadata is not copied.",
  "content_format": "text/plain",
  "visibility": "public",
  "links": [
    {
      "name": "Image to ASCII art",
      "url": "https://happytails.ai/en/image-tools/image-to-ascii-art/"
    },
    {
      "name": "Compress image",
      "url": "https://happytails.ai/en/image-tools/compress-image/"
    }
  ],
  "tool": {
    "id": "image-color-replacement",
    "category": "image-tools",
    "built": true,
    "requirements": "Runs locally without uploads. One still PNG, JPEG or WebP up to 20 MiB and 16 million decoded pixels, with at most 16,384 pixels per side. Replaces pixels within a hard RGB distance of the selected source color. Zero tolerance matches the exact color; 100 matches all colors. Decoded alpha bytes stay unchanged. The browser may discard hidden RGB values in transparent pixels and convert the source color profile. Download the complete PNG, black-and-white selection mask and settings report. Original metadata is not retained. Outputs are limited to 100 MiB in total; processing stops after 30 seconds.",
    "implementation": {
      "fields": [
        {
          "key": "source",
          "label": "Source color",
          "value": "#000000",
          "type": "color"
        },
        {
          "key": "replacement",
          "label": "Replacement color",
          "value": "#00ff00",
          "type": "color"
        },
        {
          "key": "tolerance",
          "label": "Color tolerance (%)",
          "value": "0",
          "type": "number",
          "min": 0,
          "max": 100,
          "step": 0.1
        },
        {
          "key": "includeTransparent",
          "label": "Include fully transparent pixels",
          "value": false,
          "type": "checkbox"
        }
      ],
      "registrationFamily": "pixel-editing",
      "files": true,
      "input": false,
      "multiple": false,
      "accept": ".png,.jpg,.jpeg,.webp",
      "maxFileBytes": 20971520,
      "deferImagePreview": true,
      "note": "Runs locally without uploads. One still PNG, JPEG or WebP up to 20 MiB and 16 million decoded pixels, with at most 16,384 pixels per side. Replaces pixels within a hard RGB distance of the selected source color. Zero tolerance matches the exact color; 100 matches all colors. Decoded alpha bytes stay unchanged. The browser may discard hidden RGB values in transparent pixels and convert the source color profile. Download the complete PNG, black-and-white selection mask and settings report. Original metadata is not retained. Outputs are limited to 100 MiB in total; processing stops after 30 seconds.",
      "experience": {
        "automatic": false,
        "single": false,
        "inputMaxLength": 1000000,
        "inputMode": "text",
        "label": "Your text",
        "placeholder": "Type or paste your input…",
        "help": "Up to 1,000,000 characters. Review the settings before running.",
        "action": null
      },
      "mode": "explicit",
      "interactive": false
    },
    "execution": "Browser interface",
    "api": null,
    "browser_agent": {
      "supported": true,
      "name": "run_current_tool",
      "discovery": "WebMCP on the human page in a supporting browser",
      "verification": "See audit/API-AUDIT.md; availability is not verification"
    }
  },
  "markdown": "# Replace image color\n\n- Human page: https://happytails.ai/en/image-tools/image-color-replacement/\n- Markdown: https://happytails.ai/en/image-tools/image-color-replacement.md\n- Structured JSON: https://happytails.ai/agents/en/image-tools/image-color-replacement/index.json\n- Visibility: public\n\n## Tool capabilities\n\n| Property | Value |\n| --- | --- |\n| Tool ID | `image-color-replacement` |\n| Category | image-tools |\n| Implementation | Registered implementation. Registration alone is not a production-quality guarantee. |\n| Browser execution | Use the visible action or interactive controls. |\n| Browser processing | Browser; see tool notes for network behavior. |\n| HTTP API | Not callable through HTTP. |\n| Browser-agent interface | run_current_tool |\n\n### Implementation notes\n\nRuns locally without uploads. One still PNG, JPEG or WebP up to 20 MiB and 16 million decoded pixels, with at most 16,384 pixels per side. Replaces pixels within a hard RGB distance of the selected source color. Zero tolerance matches the exact color; 100 matches all colors. Decoded alpha bytes stay unchanged. The browser may discard hidden RGB values in transparent pixels and convert the source color profile. Download the complete PNG, black-and-white selection mask and settings report. Original metadata is not retained. Outputs are limited to 100 MiB in total; processing stops after 30 seconds.\n\n### Inputs and settings\n\nNo free-text input is required. Use the file inputs and/or settings below.\n\nAccepted browser files: `.png,.jpg,.jpeg,.webp`. Choose one file.\n\nBrowser file-input limit: 20971520 bytes in total. HTTP limits can differ.\n\n| Setting | Meaning | Control type | Default | Constraints |\n| --- | --- | --- | --- | --- |\n| `source` | Source color | color | \"#000000\" |  |\n| `replacement` | Replacement color | color | \"#00ff00\" |  |\n| `tolerance` | Color tolerance (%) | number | \"0\" | min=0 max=100 step=0.1 |\n| `includeTransparent` | Include fully transparent pixels | checkbox | false |  |\n\n### Browser-agent workflow\n\n1. Open the human page in a browser that supports WebMCP.\n2. Discover the interface exposed by that page; use its actual schema.\n3. Select files on the page first when the tool requires files.\n4. Call `run_current_tool` with valid input and settings.\n5. Inspect the returned result or error and the displayed output. Retrieve files from the displayed download links.\n\nCalls do not automatically copy or download results. Browser permissions still apply. Interface availability alone is not proof of successful execution.\n\n### Planning specification\n\nRuns locally without uploads. One still PNG, JPEG or WebP up to 20 MiB and 16 million decoded pixels, with at most 16,384 pixels per side. Replaces pixels within a hard RGB distance of the selected source color. Zero tolerance matches the exact color; 100 matches all colors. Decoded alpha bytes stay unchanged. The browser may discard hidden RGB values in transparent pixels and convert the source color profile. Download the complete PNG, black-and-white selection mask and settings report. Original metadata is not retained. Outputs are limited to 100 MiB in total; processing stops after 30 seconds.\n\nThis describes intended requirements. Use the implementation notes, interface schema and observed output to determine current support.\n\n### Complete machine-readable capability record\n\n```json\n{\n  \"id\": \"image-color-replacement\",\n  \"category\": \"image-tools\",\n  \"built\": true,\n  \"requirements\": \"Runs locally without uploads. One still PNG, JPEG or WebP up to 20 MiB and 16 million decoded pixels, with at most 16,384 pixels per side. Replaces pixels within a hard RGB distance of the selected source color. Zero tolerance matches the exact color; 100 matches all colors. Decoded alpha bytes stay unchanged. The browser may discard hidden RGB values in transparent pixels and convert the source color profile. Download the complete PNG, black-and-white selection mask and settings report. Original metadata is not retained. Outputs are limited to 100 MiB in total; processing stops after 30 seconds.\",\n  \"implementation\": {\n    \"fields\": [\n      {\n        \"key\": \"source\",\n        \"label\": \"Source color\",\n        \"value\": \"#000000\",\n        \"type\": \"color\"\n      },\n      {\n        \"key\": \"replacement\",\n        \"label\": \"Replacement color\",\n        \"value\": \"#00ff00\",\n        \"type\": \"color\"\n      },\n      {\n        \"key\": \"tolerance\",\n        \"label\": \"Color tolerance (%)\",\n        \"value\": \"0\",\n        \"type\": \"number\",\n        \"min\": 0,\n        \"max\": 100,\n        \"step\": 0.1\n      },\n      {\n        \"key\": \"includeTransparent\",\n        \"label\": \"Include fully transparent pixels\",\n        \"value\": false,\n        \"type\": \"checkbox\"\n      }\n    ],\n    \"registrationFamily\": \"pixel-editing\",\n    \"files\": true,\n    \"input\": false,\n    \"multiple\": false,\n    \"accept\": \".png,.jpg,.jpeg,.webp\",\n    \"maxFileBytes\": 20971520,\n    \"deferImagePreview\": true,\n    \"note\": \"Runs locally without uploads. One still PNG, JPEG or WebP up to 20 MiB and 16 million decoded pixels, with at most 16,384 pixels per side. Replaces pixels within a hard RGB distance of the selected source color. Zero tolerance matches the exact color; 100 matches all colors. Decoded alpha bytes stay unchanged. The browser may discard hidden RGB values in transparent pixels and convert the source color profile. Download the complete PNG, black-and-white selection mask and settings report. Original metadata is not retained. Outputs are limited to 100 MiB in total; processing stops after 30 seconds.\",\n    \"experience\": {\n      \"automatic\": false,\n      \"single\": false,\n      \"inputMaxLength\": 1000000,\n      \"inputMode\": \"text\",\n      \"label\": \"Your text\",\n      \"placeholder\": \"Type or paste your input…\",\n      \"help\": \"Up to 1,000,000 characters. Review the settings before running.\",\n      \"action\": null\n    },\n    \"mode\": \"explicit\",\n    \"interactive\": false\n  },\n  \"execution\": \"Browser interface\",\n  \"api\": null,\n  \"browser_agent\": {\n    \"supported\": true,\n    \"name\": \"run_current_tool\",\n    \"discovery\": \"WebMCP on the human page in a supporting browser\",\n    \"verification\": \"See audit/API-AUDIT.md; availability is not verification\"\n  }\n}\n```\n\n## Page guide\n\nReplace one color in an image while keeping transparency. Adjust tolerance and download the edited PNG and selection mask.\n\nHow can we improve this tool?\n\nReport a problem or share an idea.\n\nPlease leave out private information. Your message and the tool name go to our team via PostHog.\n\n### How to use Replace image color\n\n1. Choose a still PNG, JPEG or WebP image.\n2. Select the source color, replacement color and tolerance.\n3. Run the tool, compare the original and result, and download the PNG, selection mask or report.\n\n## Useful next steps\n\n- [Image to ASCII art](https://happytails.ai/en/image-tools/image-to-ascii-art/) ([Markdown](https://happytails.ai/en/image-tools/image-to-ascii-art.md))\n\n- [Compress image](https://happytails.ai/en/image-tools/compress-image/) ([Markdown](https://happytails.ai/en/image-tools/compress-image.md))\n\n## See exactly what changed\n\nThe selection mask is white where a pixel matched and black everywhere else. Tolerance uses RGB distance. It is a hard threshold, not a feathered selection.\n\n### Keep transparency\n\nThe replacement preserves the decoded alpha channel. Fully transparent pixels are skipped unless you include them. Browser decoding can change hidden RGB values and color profiles; original metadata is not copied.\n"
}