Logo de Color Correction

Color Correction

Comunidade
artokun
color-correction

Diagnostique e corrija a cor de vídeos/imagens de forma OBJETIVA com a ferramenta get_image (action:"analyze_color") (escopos/estatísticas como pontos de preto e branco, contraste, saturação, recorte e dominante de cor), em vez de avaliar no olho uma folha de contatos. Abrange o padrão de imagem "lavada", por que o ajuste de cor por referência (mkl/ColorMatch/ColorMatchAdobe) NÃO consegue adicionar contraste que não existe em uma fonte sem contraste, a correção com níveis/expansão de contraste (AdjustContrast / CurveEditor principais), o ciclo medir→corrigir→medir novamente, o padrão de teste lado a lado e onde aplicar a correção em um grafo de renderização (após a decodificação e antes de salvar). Use quando uma renderização parecer lavada / sem contraste / sem vida / saturada demais / com dominante de cor, ou ao decidir entre ajuste de cor por referência e correção de contraste/níveis.

Add to TypingMind

Visão geral

Publicado porartokun
Repositóriocomfyui-mcp
Nome da habilidadecolor-correction
Estrelas
811
Forks
137
Arquivos incluídos
Somente instruções
LicençaMIT
Links
  • Instruções em Markdown

    Um arquivo SKILL.md que o modelo carrega sob demanda, consumindo tokens apenas quando uma solicitação é realmente relevante para a habilidade.

  • Funciona com qualquer LLM

    As habilidades de IA são escritas em Markdown simples, não em código específico de um provedor. Por isso, funcionam com GPT, Claude, Gemini, Grok ou um modelo local.

  • Sem arquivos extras

    Tudo de que o modelo precisa está nas instruções — sem arquivos extras para sincronizar.

  • Código aberto

    Publicada por artokun no GitHub. Leia os arquivos da habilidade antes de instalá-la.

Instalação

Instale a habilidade de IA Color Correction no TypingMind para usá-la com qualquer LLM ou adicione-a a outro agente que leia SKILL.md.

1

Instalar no TypingMind

O TypingMind instala uma habilidade diretamente da pasta dela no GitHub — lê o arquivo SKILL.md, reúne os arquivos de recursos em um pacote e armazena o resultado localmente.

  1. Abra o app e vá para Plugins → Habilidades.
  2. Escolha "Instalar do GitHub".
  3. Cole a URL abaixo, que aponta para a pasta da habilidade, e confirme.
    https://github.com/artokun/comfyui-mcp/tree/main/plugin/skills/color-correction
  4. Ative a habilidade em cada chat em que quiser disponibilizá-la.
Plugins → Habilidades → Adicionar habilidade → Via URL do GitHub. Depois, cole a URL da pasta e pressione Continuar.
2

Instalar em outro agente

Qualquer agente que leia o formato Agent Skills pode usar esta habilidade — copie a pasta para o diretório de habilidades desse agente.

Claude Code — .claude/skills
git clone --depth 1 https://github.com/artokun/comfyui-mcp.git /tmp/comfyui-mcp
mkdir -p .claude/skills
cp -r /tmp/comfyui-mcp/plugin/skills/color-correction .claude/skills/color-correction
Reinicie Claude Code após copiar para que a nova habilidade seja reconhecida.

Use no TypingMind

Ative Color Correction em qualquer chat do TypingMind e o modelo cuida do resto. O nome e a descrição da habilidade ficam no prompt do sistema e, assim que uma solicitação relevante aparece, o modelo carrega as instruções completas automaticamente — sem precisar de acionamento manual e sem consumir tokens até que ela seja realmente usada.

O modelo carrega Color Correction automaticamente assim que uma solicitação é relevante para essa habilidade.

Funciona com qualquer modelo de IA

Habilidades de IA são instruções em Markdown simples, não código específico de um provedor. Por isso, Color Correction não fica vinculada ao modelo para o qual foi criada. Instale-a uma vez no TypingMind e use-a com GPT-5, Claude, Gemini, Grok, DeepSeek, Mistral, Llama ou um modelo local executado por conta própria — tudo com suas próprias chaves de API.

  • Carregada apenas quando necessário

    O prompt do sistema contém apenas o nome e a descrição. As instruções são buscadas na primeira solicitação relevante, então uma habilidade sem uso não gera custo.

  • Troque de modelo durante a conversa

    Como a habilidade é composta de instruções, não de código, trocar de modelo não afeta seu funcionamento — o próximo modelo lê o mesmo arquivo SKILL.md.

Instruções da habilidade

Este é o conteúdo de SKILL.md que o modelo carrega. Leia antes de instalar — uma habilidade é um conjunto de instruções que seu modelo seguirá.

Color Correction (measure, don't eyeball)

The core principle

You cannot reliably judge color from a storyboard or contact sheet. "Is it washed out?" flip-flops by eye, especially on AI-gen video. Make color measurable with the get_image (action:"analyze_color") MCP tool, read the numbers like a colorist reads scopes, pick the fix the data points to, then re-measure to confirm. The whole skill is this loop:

extract a frame ─► get_image (action:"analyze_color") ─► read black/white points + contrast + saturation
       ▲                                          │
       │                                          ▼
   re-measure  ◄──── apply fix (levels / contrast / match) ◄── diagnose from the numbers

Origin: on a WAN-Animate render we argued for many turns over whether the clip was "washed out." The instant we measured it, the answer was unambiguous and the correct fix (a contrast stretch, not the color-match nodes we'd been adding) fell straight out.


The get_image (action:"analyze_color") tool

Read-only. Source = asset_id, a ComfyUI output ref (filename/subfolder/type), or an image path (absolute, or under the output dir). It returns per-image stats, heuristic flags, a one-line verdict, and optionally an overlaid R/G/B/luma histogram PNG.

get_image({ action: "analyze_color", filename: "render_00007_.png" })       # absolute numbers
get_image({ action: "analyze_color", path: "frame.png", reference_path: "src.jpg" })  # + shot-match deltas
get_image({ action: "analyze_color", filename: "x.png", histogram: true })  # + histogram image

For videos, get_image (action:"analyze_color") is image-only (no ffmpeg dep). Extract a frame first with the ComfyUI venv's cv2:

bash
"<comfy-venv>/python" -c "import cv2; c=cv2.VideoCapture(r'IN.mp4'); n=int(c.get(7)); \
  c.set(1, n//2); _,f=c.read(); cv2.imwrite(r'frame.png', f)"

Grab the middle frame, or frame 0. For window-drift checks grab a frame from each window.

What the numbers mean (8-bit)

FieldReads like a scopeHealthy-ish
luma.blackPoint (1st pct)where shadows bottom out~0–16 (lifted if >16)
luma.whitePoint (99th pct)where highlights top out~240–255 (dim if <235)
luma.contrast (std)overall punch~45+ (flat if <45)
luma.dynamicRangewhite−blackwide is good
saturation.meanSaturation (HSV S)vectorscope spread~0.25+ (dull if <0.22)
channels.{r,g,b}Mean + castHintRGB parade / white balancespread <~12 = neutral
luma.clippedHighPct/LowPctblown / crushed pixelskeep low (<~2%)

Flags: washedOut, lowContrast, liftedBlacks, dimHighlights, lowSaturation, colorCast.


The "washed out" signature

Washed out means compressed tonal range, and it has an exact fingerprint:

  • whitePoint well below 255 (e.g. 191), so highlights never reach white
  • blackPoint lifted off 0 (e.g. 45), giving milky shadows
  • contrast low (std < 45)
  • often normal saturation. Washout is usually not a saturation problem.

If you see that, the fix is a levels / contrast stretch, not a color match. In a real case, a WAN-Animate frame measured blackPoint 45 / whitePoint 191 / contrast 43, clearly a range problem; saturation 0.25 was fine.


The load-bearing insight: a reference-match can't add contrast the source lacks

The instinct is to "match the render to the input photo" with a color-match node (ColorMatchV2 mkl/hm, ImageColorMatchAdobe+, easy imageColorMatch). Measure the reference first. If the reference is itself flat (e.g. a casual phone selfie with blackPoint 40, contrast 44), matching to it cannot produce punch; you'll match your way to the same flat numbers. In the real case, mkl and Adobe matches both left the frame flagged washedOut (whitePoint only crept from 191 to ~218).

So:

  • Use a reference-match (ColorMatchV2, ImageColorMatchAdobe+) when you want to match a known-good graded frame or shot-match across clips, and the reference is actually good.
  • Use a levels / contrast stretch when the defect is compressed range (the washout case). It targets full range regardless of the reference. This is usually the real fix.

The fix: contrast / levels stretch (core nodes, no install)

AdjustContrast (core comfy_extras.nodes_dataset, category image/adjustments) has one factor (1.0 = none, >1 = more). It pivots around mid-gray, so it pushes the white point up and the black point down together. Tune it by measurement, not feel. A real measured sweep on the washout frame:

factorblackPointwhitePointcontrastsatclippedHighverdict
1.329239560.330%✅ not washed (slightly soft)
~1.4~20~247~60~0.38~1–2%✅ sweet spot
1.67254670.447.2% ⚠️punchy but blows highlights

Pick the factor that lands whitePoint ~248 to 255 with clippedHighPct < ~2%. Going too far (1.6 here) blows highlights and over-warms, because per-channel contrast drops blue more than red and castHint worsens. The sweet spot was ~1.4.

Other levers when contrast alone isn't enough:

  • CurveEditor (core, utilities) feeds a CURVE for precise black/white-point and gamma control (a true levels curve) when you need more than a single contrast pivot.
  • AdjustContrast plus a small saturation/brightness adjust (same image/adjustments family) to fine-tune after the stretch.
  • A mild reference-match after the stretch, only if you need to shot-match.

The sandbox pattern (test corrections side by side, then measure)

Don't tune blind on the full pipeline. Build a tiny separate workflow (panel_new_workflow) and let one run produce several candidates you then measure:

LoadImage (the washed frame, staged into input/)
LoadImage (the reference, if shot-matching)
        │
        ├─► AdjustContrast factor 1.3 ─► SaveImage "contrast13"
        ├─► AdjustContrast factor 1.6 ─► SaveImage "contrast16"
        ├─► ColorMatchV2 (mkl, ref)   ─► SaveImage "balance_mkl"
        └─► ImageColorMatchAdobe+(LAB)─► SaveImage "balance_adobe"

Run once, then get_image (action:"analyze_color") every output, plus the reference and the untouched frame, and compare blackPoint / whitePoint / contrast / saturation / clippedHigh. Whichever lands the numbers in range wins; interpolate the factor (1.3 vs 1.6 gives 1.4) and confirm with one more pass. Stage the frame into the ComfyUI input dir first (cp the extracted PNG there) so LoadImage can see it. Input and output dirs may be custom, so don't guess paths.


Porting the fix into a render graph

Place the chosen correction after decode, before the save. For a WAN/video graph that's right after WanVideoDecode (or the per-chunk color-match) and feeding the VHS_VideoCombine/save node. One AdjustContrast node is usually the whole fix. Keep it as a single inline node (or a small bypassable group) so it's easy to toggle and re-tune. Re-render a clip, extract a frame, get_image (action:"analyze_color") it, and nudge the factor to hit whitePoint ~250.


Video-specific gotchas

  • Per-window drift (WAN long video). WAN-Animate/long clips render in temporal windows and can desaturate or dim across them. Measure a frame from the first window and a late window. If they differ, that's drift, not a global grade issue; use the embeds' between-window colormatch, not a final stretch.
  • Relight LoRA is not levels. A WanAnimate relight LoRA changes lighting, not black/white points. It won't fix a compressed-range washout. Measure before and after to prove it.
  • Don't over-stretch. Watch clippedHighPct; blown highlights are unrecoverable. Prefer the lower factor that still clears dimHighlights.
  • Cast is often inherited. If the reference has the same warm/cool cast (festival/sunset light), a matching cast on the render is correct. Don't "fix" it.

Quick reference — the decision tree

get_image (action:"analyze_color") on the frame
  ├─ washedOut / lowContrast / dimHighlights ........ contrast/levels stretch (AdjustContrast ~1.4 → measure)
  ├─ lowSaturation only ............................. saturation boost (small)
  ├─ colorCast (and reference is neutral) ........... white-balance / neutralization, or reference-match
  ├─ want to MATCH a known-good graded frame ........ ColorMatchV2 / ImageColorMatchAdobe+ (ref must be good)
  └─ blackPoint/whitePoint already 0/255, sat ok .... color is healthy — stop touching it

Always re-measure after the fix. If get_image (action:"analyze_color") still flags it, the fix was wrong. Adjust and measure again. Numbers over vibes.

Sources

  • Official: comfyui-mcp get_image action:"analyze_color" product behavior (this repo).
  • Empirical: washed-out signature and levels-stretch recipes from observed renders.

Perguntas frequentes

O que a habilidade de IA Color Correction faz?

Diagnostique e corrija a cor de vídeos/imagens de forma OBJETIVA com a ferramenta get_image (action:"analyze_color") (escopos/estatísticas como pontos de preto e branco, contraste, saturação, recorte e dominante de cor), em vez de avaliar no olho uma folha de contatos. Abrange o padrão de imagem "lavada", por que o ajuste de cor por referência (mkl/ColorMatch/ColorMatchAdobe) NÃO consegue adicionar contraste que não existe em uma fonte sem contraste, a correção com níveis/expansão de contraste (AdjustContrast / CurveEditor principais), o ciclo medir→corrigir→medir novamente, o padrão de tes...

Por que usar Color Correction no TypingMind?

Porque basta instalar uma vez para usar com qualquer modelo. A habilidade Color Correction é escrita em Markdown simples, e não em código específico de um provedor, então a mesma habilidade funciona com GPT-5, Claude, Gemini, Grok ou um modelo local — e é possível trocar de modelo no meio do chat sem que ela deixe de funcionar. No TypingMind, você usa suas próprias chaves de API e paga diretamente aos provedores, em vez de pagar uma assinatura por licença de usuário. Suas habilidades e chats permanecem no seu próprio armazenamento.

Como instalar Color Correction no TypingMind?

Abra Plugins → Habilidades → Instalar do GitHub no TypingMind e cole https://github.com/artokun/comfyui-mcp/tree/main/plugin/skills/color-correction. O TypingMind lê o arquivo SKILL.md e instala a habilidade para que possa ser ativada em cada chat.

Quais modelos de IA podem usar Color Correction?

Qualquer modelo conectado no TypingMind. As habilidades de IA são instruções em Markdown simples, e não código específico de um provedor. Assim, GPT, Claude, Gemini, Grok e modelos locais podem carregar esta habilidade quando uma solicitação corresponder a ela.

Quantos modelos de IA posso usar com Color Correction?

Quantos quiser. Desde que o modelo ofereça suporte a habilidades, é possível usar Color Correction com ele — GPT, Claude, Gemini, Grok, DeepSeek, Mistral, Llama e outros — tudo no TypingMind com suas próprias chaves de API.

A habilidade de IA Color Correction é gratuita?

Sim. A habilidade é publicada no GitHub por artokun sob a licença MIT. O pagamento é feito apenas ao seu provedor de IA pelos tokens usados.

O que são habilidades de IA?

Uma habilidade de IA é um conjunto reutilizável de instruções que ensina um modelo de IA a realizar uma tarefa específica. Ela segue o formato aberto Agent Skills: um arquivo SKILL.md com nome e descrição, além de scripts, templates ou arquivos de referência de que o modelo possa precisar. O modelo lê as instruções apenas quando sua solicitação corresponde à habilidade, então uma habilidade instalada não gera custos até ser usada.

Qual é a diferença entre habilidades de IA e plugins ou servidores MCP?

Um plugin ou servidor MCP oferece ao modelo novas ferramentas que ele pode acionar — código que é executado em algum lugar e retorna um resultado. Já uma habilidade de IA dá ao modelo o conhecimento e as orientações de que ele precisa: como abordar uma tarefa, quais etapas seguir e como deve ser um bom resultado. As habilidades são escritas em Markdown simples, por isso não precisam de servidor, chave de API nem ambiente de execução, e funcionam com qualquer modelo.

Ver lista completa

Crie seu próprio espaço de trabalho com IA agora

Inscreva-se na nossa newsletter para receber avisos sobre novos recursos e futuros sorteios 👇