color_lineGradient_visual
A linear gradient generator with a live preview
- image
- gradient_image
Two anchor points, each with its own brightness and an optional color tint, interpolated linearly across the image - that's the same idea as this pack's color_brightGradient, but flagged as an output node so it renders the result inline on the canvas as you drag values, and shipping with a lower default start_bright (0.5 instead of 1.0), meaning out of the box this one leans toward darkening from the start point rather than staying neutral. It lives in Apt_Preset/image/visualize_edit, the pack's bucket for nodes built to be watched while you tune them.
Use it for the same jobs as any linear gradient tool: a soft directional light falloff, a graduated darkening across part of the frame, or a two-tone tint fading from one side to another.
How it works
start_x/start_y and end_x/end_y place two arbitrary points anywhere on the frame (not necessarily edge to edge), and brightness interpolates linearly between start_bright and end_bright. A color tint via overlay_color with start_alpha/end_alpha fades in on top of the brightness ramp - off by default since both alphas start at 0.
The inputs and outputs that matter
start_x/start_y/end_x/end_y(0-1, defaults 0/0 and 1/1) - the two gradient anchor points.start_bright(0-5, default 0.5) andend_bright(0-5, default 1) - the default already leans darker at the start.overlay_color(hex, default#FFFFFF) withstart_alpha/end_alpha(0-1, default 0) - the tint layer, invisible until alpha is raised.imagein,gradient_imageout - plus a live preview on the node itself since it's an output node.
How to install it
Through ComfyUI Manager: search "ComfyUI-Apt_Preset", install, restart. Manually:
cd ComfyUI/custom_nodes
git clone https://github.com/cardenluo/ComfyUI-Apt_Preset.git
then run install.bat (Windows) or install requirements manually on Linux/Mac, and restart. No model downloads for this node.
Common issues & troubleshooting
Image looks darker than expected right out of the box. start_bright defaults to 0.5, not 1 - that's already a real darkening at the start point, not neutral. Push it back toward 1 if you wanted a flat starting brightness.
No visible color tint. start_alpha/end_alpha both default to 0 - raise them to see overlay_color.
Gradient runs the wrong direction. start_x/start_y and end_x/end_y are just two independent points, not fixed to left-to-right - swap them.
Don't need the live preview mid-pipeline? color_brightGradient covers similar ground without the forced output-node behavior, for burying deeper in a longer graph.
IMPORT FAILED on the pack. ComfyUI-Apt_Preset is large and updates often; users have reported import failures after some updates. Reinstall via Manager before assuming it's this node.
Inputs (10)
| Name | Type | Default | Description |
|---|---|---|---|
| image | IMAGE | — | |
| start_x | FLOAT | 0.000–1 | — |
| start_y | FLOAT | 0.000–1 | — |
| start_bright | FLOAT | 0.500–5 | — |
| end_x | FLOAT | 1.000–1 | — |
| end_y | FLOAT | 1.000–1 | — |
| end_bright | FLOAT | 1.000–5 | — |
| overlay_color | STRING | #FFFFFF | — |
| start_alpha | FLOAT | 0.000–1 | — |
| end_alpha | FLOAT | 0.000–1 | — |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| gradient_image | IMAGE | — |