Nodes/RC Image Compositor/RC Auto Color Correction
ComfyUI Node

RC Auto Color Correction

Photoshop's Auto Tone, Auto Contrast and Auto Color, in one node

By kj863257·Created about a year ago·Updated 11 months ago· 16
RC Auto Color Correction
  • image
  • IMAGE
◄algorithmenhance_monochromatic►
◄neutralize_midtonesfalse►
◄shadow_clip0.10►
◄highlight_clip0.10►
◄target_shadow_r0►
◄target_shadow_g0►
◄target_shadow_b0►
◄target_midtone_r128►
◄target_midtone_g128►
◄target_midtone_b128►
◄target_highlight_r255►
◄target_highlight_g255►
◄target_highlight_b255►

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.

CategoryRC/Adjustments

Inputs (14)

NameTypeDefaultDescription
imageIMAGE—
algorithmCOMBOenhance_monochromaticAuto 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_midtonesBOOLEANfalseAdjust midtones so neutral colors map to target neutral
shadow_clipFLOAT0.100–5Amount of shadow data to discard (%)
highlight_clipFLOAT0.100–5Amount of highlight data to discard (%)
target_shadow_rINT00–255—
target_shadow_gINT00–255—
target_shadow_bINT00–255—
target_midtone_rINT1280–255—
target_midtone_gINT1280–255—
target_midtone_bINT1280–255—
target_highlight_rINT2550–255—
target_highlight_gINT2550–255—
target_highlight_bINT2550–255—

Outputs (1)

NameTypeDescription
IMAGEIMAGE—