RC Auto Color Correction
Photoshop's Auto Tone, Auto Contrast and Auto Color, in one node
- image
- IMAGE
Most "auto fix" buttons are lies - a slider in sheep's clothing that turns everything into a gray mush. RC Auto Color Correction is the rare one that's genuinely useful, because it's a direct port of Photoshop's trio of auto adjustment algorithms. If you've ever hit Auto Tone in PS and gotten a decent image out of it, you already know what this node does. Now you can do the same thing inside a ComfyUI graph, on a batch of images, without leaving the pipeline.
It lives in the RC Image Compositor pack (search "RC Image Compositor" in ComfyUI Manager to install). It's pure NumPy/OpenCV under the hood - no models, no downloads, instant on CPU.
How it works
All four algorithms are histogram-based, and the node's algorithm dropdown maps straight onto the familiar Photoshop commands:
- enhance_monochromatic - Auto Contrast. Clips all three channels at the same percentiles and remaps. Keeps color relationships intact.
- enhance_per_channel - Auto Tone. Clips each channel independently, which stretches contrast harder but can shift color.
- find_dark_light_colors - Auto Color. Finds the actual dark and light colors in the image and remaps those to your target shadow/highlight colors. This is the one that genuinely fixes color casts.
- enhance_brightness_contrast - the content-aware one, a CLAHE + local-contrast blend. Different beast; it's more like a smart contrast boost than a stretch.
The two percentiles you set - shadow_clip and highlight_clip - tell it how much data to discard at each end before stretching. Default is 0.1%, which is deliberately gentle. You'll usually want more.
The inputs that matter
- algorithm - the four-way choice above.
- shadow_clip / highlight_clip - % of shadows and highlights to discard (0–5%). Start at 1–2% and watch what happens to a flat image.
- neutralize_midtones - toggle this on and the node maps the midtone average toward your target, which is the classic "remove the color cast" move.
- target_shadow_rgb / target_midtone_rgb / target_highlight_rgb - the color you want each zone remapped to. Defaults are 0/128/255, i.e. pure black, neutral gray, pure white. You can tint these to push a grade.
Output is a single IMAGE tensor, so it chains straight into a save or another adjustment.
Common issues
Where people get burned: treating 0.1% clipping as "enough." On an already-exposed image it does almost nothing - that's by design, not a bug. Raise the clips.
Also don't expect miracles from enhance_monochromatic on a badly white-balanced shot. If the cast is real, use find_dark_light_colors with neutralize_midtones on; that's the combo that actually clears a yellow or blue cast. And remember these are global adjustments - on a portrait, run it before your skin-smoothing pass or you'll re-introduce the blotchiness you just removed.
Inputs (14)
| Name | Type | Default | Description |
|---|---|---|---|
| image | IMAGE | — | |
| algorithm | COMBO | enhance_monochromatic | Auto correction algorithm: - enhance_monochromatic: Clip channels identically (Auto Contrast) - enhance_per_channel: Clip channels independently (Auto Tone) - find_dark_light_colors: Find dark/light colors (Auto Color) - enhance_brightness_contrast: Content-aware enhancement |
| neutralize_midtones | BOOLEAN | false | Adjust midtones so neutral colors map to target neutral |
| shadow_clip | FLOAT | 0.100–5 | Amount of shadow data to discard (%) |
| highlight_clip | FLOAT | 0.100–5 | Amount of highlight data to discard (%) |
| target_shadow_r | INT | 00–255 | — |
| target_shadow_g | INT | 00–255 | — |
| target_shadow_b | INT | 00–255 | — |
| target_midtone_r | INT | 1280–255 | — |
| target_midtone_g | INT | 1280–255 | — |
| target_midtone_b | INT | 1280–255 | — |
| target_highlight_r | INT | 2550–255 | — |
| target_highlight_g | INT | 2550–255 | — |
| target_highlight_b | INT | 2550–255 | — |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| IMAGE | IMAGE | — |