Nodes/LF Nodes/Color Analysis
ComfyUI Node

Color Analysis

Steal the color style from one image and apply it to another, with charts to prove it

By lucafoscili·Created 2 years ago·Updated 2 years ago· 50
Color Analysis
  • source_image
  • target_image
  • ui_widget
  • image
  • image_list
  • dataset

Color grading is where a good render becomes a cohesive render. The LF Nodes LF_ColorAnalysis is a two-input node that does the classic grade-transfer move: you give it a source_image - the shot with the color palette you love - and a target_image to fix, and it adjusts the target to match the source's color pattern. It's output-node territory: you run it to see and understand the result, and the charts it draws are half the point.

That's the part that makes this node interesting rather than just another color-match utility. The widget is a KUL_TAB_BAR_CHART - a tabbed bar-chart view that breaks down the color distribution. You're not trusting the result on vibes; you're looking at the before/after color histograms and can tell whether the grade actually landed. For a beginner, that's a genuinely educational way to watch a color transfer work.

The inputs and outputs

  • source_image - where the style comes from.
  • target_image - what gets adjusted to match.
  • Outputs: image (the graded result), image_list, and dataset - a JSON object with the analysis data. That dataset output is the sneaky-valuable one: you can pipe the color statistics into the pack's JSON nodes (LF_DisplayJSON, LF_GetValueFromJSON) or log them to compare grades across experiments.

What it's not

Reality check, because the name overpromises slightly: this is a statistical color match - histogram/color-distribution alignment - not a learned style transfer and not a "make the target a copy of the source's lighting" tool. You can't turn a daytime shot into golden hour and have it fool anyone; what you get is the target's colors nudged toward the source's palette. Within that honest scope it works well, and it's fast because it's just math on pixel distributions.

Installing it

Standard LF Nodes:

cd ComfyUI/custom_nodes
git clone https://github.com/lucafoscili/comfyui-lf

or ComfyUI Manager → LF Nodes → install → restart. No dependencies, no models. The pack is the frozen legacy repo (development moved to lf-nodes), so expect stability, not new features.

Where people get burned

  • It's a comparison/analysis node - is_output_node is true, so the image output is the graded result but the node is really meant to sit at the end of a branch for inspection. If you want a lightweight per-image color correction in the middle of a pipeline, the pack's LF_Brightness/LF_Contrast filters are the ones for that.
  • Source/target resolution differences: match sizes first for a clean comparison, or you'll be reading charts of mismatched regions.
  • The dataset JSON only appears after a run - it's not a preview artifact. Queue once, then inspect.

For anyone learning color grading, or anyone who wants proof their grade worked, this is the node that turns "I think it matches" into "here's the histogram."

Category✨ LF Nodes/Analytics

Inputs (3)

NameTypeDefaultDescription
source_imageIMAGESource image from which to extract the color style.
target_imageIMAGETarget image to be adjusted to match the source color pattern.
ui_widgetoptKUL_TAB_BAR_CHART[object Object]

Outputs (3)

NameTypeDescription
imageIMAGE
image_listIMAGE
datasetJSON