Nodes/Niutonian_Comfyui_Philips_Hue/Niutonian: ComfyUI Hue Edge Bar simple
ComfyUI Node

Niutonian: ComfyUI Hue Edge Bar simple

The Hue node you'll actually leave in your workflow

By Niutonian·Created 4 months ago·Updated 3 months ago· 0
Niutonian: ComfyUI Hue Edge Bar simple
  • image
  • image
  • edge_bar_json
  • average_rgb
bridge_ip192.168.1.100
api_key
light_id1
modesend
brightness180
edge_width32
transitiontime6
light_modeauto

The README calls Niutonian: ComfyUI Hue Edge Bar simple the recommended node for normal use, and for once the README is right. It does the same job as the pack's advanced "Hue Edge Bar" - sample the colors around a generated image and push a matching color to your Philips Hue lights - but it hides every tuning knob behind tasteful defaults. You feed it an image, tell it which light to hit, and it just works. That's exactly what you want from a node whose output is judged in a different room.

What the defaults actually buy you

Digging into the source, the "simple" name undersells it: the author shipped genuinely sensible color logic in here. The node crops 1% off the image borders so hard black frame edges don't poison the sample, filters out pixels darker than 8 and brighter than 250 (so a letterboxed image or a blown-out sky can't dominate), picks the dominant edge color rather than a flat average, and then applies a mild saturation boost and vibrance curve. The result is that colors land punchy but not clownish - a warm sunset actually reads as warm light, not as a washed-out beige. This is the version you want running every generation while you work; the advanced node is for when you specifically want to fight with one of those decisions.

Inputs and outputs

The required inputs are the whole story: image (anything ComfyUI can produce - wire it to a VAE decode), bridge_ip, api_key, light_id, and mode (send, preview_only, or turn_off).

Then just four knobs:

  • brightness - Hue brightness, 1 to 254. Default 180 is a comfortable room light.
  • edge_width - pixels of the border to sample, default 32. Crank toward 48 if the border colors are washing out.
  • transitiontime - fade time in tenths of a second. 6 means 0.6s; bump it if the light feels jumpy.
  • light_mode - leave on auto. It inspects the actual light and picks the right command type (color_xy, hue_sat, white_temperature, or brightness_only) from what that bulb supports.

Outputs are the same trio as the advanced node: image (pass-through), edge_bar_json (the virtual LED bar plus debug data), and average_rgb - the final r,g,b string sent to the bridge. You can mostly ignore them; the point of this node is that the light is the output.

Installing it

ComfyUI Manager search "Niutonian", or:

cd ComfyUI/custom_nodes
git clone https://github.com/Niutonian/Niutonian_Comfyui_Philips_Hue

Restart ComfyUI. No extra Python packages, no models to download - it's numpy and the Python standard library.

Before it can send anything you need the one-time setup: run Niutonian: Hue Setup with action = auto_scan to find the bridge, register_new while pressing the physical bridge button, then list_lights to get your light's numeric ID. Then leave api_key blank here - it reads the saved key from hue_config.json on its own.

Where people get burned

The classic failure is a light that doesn't change: bridge_ip stuck on the sample 192.168.1.100 default instead of your real bridge, or mode still on preview_only from when you were testing. Run test_flash from the setup node first - if that works, your connection is fine and the problem is one of those two fields. And if the color feels slightly off, don't reach for the advanced node yet: raise transitiontime a notch first. Fades at 0.6 seconds are snappy enough to look like a glitch to your eyes.

CategoryNiutonian/Philips Hue

Inputs (9)

NameTypeDefaultDescription
imageIMAGE
bridge_ipSTRING192.168.1.100
api_keySTRING
light_idSTRING1
modeCOMBOsend3 options: send, preview_only, turn_off
brightnessoptINT1801–254
edge_widthoptINT321–512
transitiontimeoptINT60–6000
light_modeoptCOMBOauto5 options: auto, color_xy, hue_sat, white_temperature, brightness_only

Outputs (3)

NameTypeDescription
imageIMAGE
edge_bar_jsonSTRING
average_rgbSTRING