Skills Plugins MCP Prompt Model 导航 博客 资讯 我的中心
模型与提供方 #background-removal#chroma-key#codex-plugin#game-assets#mcp#sprites

chroma-cut

DeepSeek Harness bundle for Chroma Cut: cut chroma-backed raster assets into transparent PNGs through the mcp__chroma_cut__cut_asset and mcp__chroma_cut__cut_sheet tools.

avdergh @avdergh ⬇ 1 ★ 0 main

安装

dsh plugin --profile web add github:avdergh/chroma-cut
下载安装清单

需要可复现安装时,可在仓库后追加 #commit 固定提交。

DeepSeek Harness bundle for Chroma Cut: cut chroma-backed raster assets into transparent PNGs through the mcp__chroma_cut__cut_asset and mcp__chroma_cut__cut_sheet tools.

该插件未提供要点说明,请参考仓库 README。

background-removalchroma-keycodex-plugingame-assetsmcpsprites
  1. 安装并启动 DeepSeek Harness:npx @deepseek-ai/dsh web
  2. 在终端执行上面的安装命令(CLI 会解析插件并核验来源)
  3. 用 dsh plugins list 确认已安装,必要时重启 Harness 生效

插件以当前 dsh 进程的权限运行,安装时可能执行代码。请先通读仓库源码与许可证,确认无破坏性命令与越权访问;本站只做索引,不对第三方插件安全性作担保。

代码仓库github.com/avdergh/chroma-cut
许可证MIT
主要语言main
下载量1
GitHub 星标0
最近推送2026-08-28
收录日期2026-09-19
分类模型与提供方

事实信息来自公开插件目录快照(2026-10-01),介绍文案由本站再加工。

以下为插件仓库 README 全文(原始内容,由公开目录抓取整理)。

# Chroma Cut

[English](README.md) · [简体中文](README.zh-CN.md)

Remove solid-color backgrounds from AI-generated images and game asset sheets without
shaving off dark anti-aliased outlines.

## Use cases

- Turn AI-generated icons, props, characters, and effects into transparent PNGs.
- Split a chroma-backed sprite or UI sheet into individual assets.
- Remove magenta, green, blue, or cyan backgrounds with mild gradients and noise.
- Keep related assets on matching canvases and anchors for animation or state changes.

## Features

- Automatic chroma-color detection from the crop border.
- Soft Color-to-Alpha matting with chroma-spill removal.
- Dark-outline and similar-foreground-color preservation.
- Single-asset CLI and JSON batch processing.
- Optional canvas and anchor normalization for grouped assets.
- Checkerboard, black, and white QA previews.
- Local MCP server with `cut_asset` and `cut_sheet`.

## Installation

Python 3.11 or newer is required.

```bash
python -m pip install "git+https://github.com/avdergh/chroma-cut.git"
```

For development:

```bash
git clone https://github.com/avdergh/chroma-cut.git
cd chroma-cut
python -m pip install -e .
```

## Quick start

### Cut one asset

The crop box format is `left,top,right,bottom`.

```bash
chroma-cut cut sheet.png output.png --box 100,50,500,600 --padding 12
```

### Cut a sheet

```bash
chroma-cut batch examples/sample-job.json
```

Example job:

```json
{
  "version": 1,
  "output_dir": "./output",
  "sources": {
    "sheet": "./sheet.png"
  },
  "assets": [
    {
      "name": "energy_icon",
      "source": "sheet",
      "box": [0, 0, 512, 512],
      "padding": 12
    }
  ],
  "qa": {
    "preview": "qa_checker.png",
    "black_preview": "qa_black.png",
    "white_preview": "qa_white.png"
  }
}
```

Batch jobs can also normalize related assets:

- `same_canvas`: preserve artwork scale and use one shared canvas.
- `resize_same_bounds`: resize visible artwork to matching bounds.
- `center` and `bottom_center` alignment are supported.

## MCP

Start the local stdio server:

```bash
chroma-cut-mcp
```

Available tools:

- `cut_asset`: cut one image region into a transparent PNG.
- `cut_sheet`: run a JSON batch job.

## DeepSeek Harness

[`plugins/dsh-chroma-cut/`](plugins/dsh-chroma-cut) is an installable
[DeepSeek Harness](https://github.com/deepseek-ai/deepseek-harness) bundle. It
mounts the same Python MCP server through the DSH-shipped MCP client bridge,
so the agent gains two native tools:

- `mcp__chroma_cut__cut_asset` — cut one image region into a transparent PNG.
- `mcp__chroma_cut__cut_sheet` — run a JSON batch job.

Install from npm (or a packed tarball) into a profile:

```sh
dsh plugin --profile  add dsh-chroma-cut
dsh --profile    # first run bootstraps the Python runtime in ~/.cache
```

Without npm, use the GitHub Release tarball:
`dsh plugin --profile  add https://github.com/avdergh/chroma-cut/releases/download/v0.1.3/dsh-chroma-cut-0.1.3.tgz`

See [plugins/dsh-chroma-cut/README.md](plugins/dsh-chroma-cut/README.md) for
details, environment overrides, and publishing steps.

## How it works

Chroma Cut detects the backing hue from pixels around the crop border, separates the
outside background from enclosed foreground regions, and estimates the local backing
color around the silhouette. It then calculates fractional alpha and removes the
backing-color contribution from edge RGB values. Opaque interior pixels are preserved,
so black outlines and foreground colors close to the backing hue remain intact.

## Limitations

Automatic mode is intended for bright, saturated, mostly single-hue backgrounds. It is
not a semantic background remover for photographs, hair, smoke, glass, or complex
multicolored scenes.

## Testing

```bash
python -m unittest discover -s tests -v
```

## License

MIT. See [LICENSE](LICENSE).

数据来源:公开的 DeepSeek Harness 插件目录与各插件 GitHub 仓库。本站为独立第三方目录,与 DeepSeek、幻方(High-Flyer)及插件作者均无隶属或背书关系。

每日精选 Skill 推荐,免费送到你邮箱

输入邮箱,每天接收一个精选 AI Agent 技能推荐。完全免费,持续更新。

提交后我们会发送一封确认邮件,点击邮件里的链接才会开始收信。

完全免费,取消任意时间。我们不会发送垃圾邮件。