DY Adaptive Color Lines
Scribbles that borrow their color from the image
- image
- IMAGE
DY Adaptive Color Lines is RandomLines' smarter sibling. Same idea - scatter random lines over your image on a transparent overlay and composite them back - but instead of drawing everything in a fixed base color, each line samples its color from the image at the line's own midpoint. The scribbles stop looking like pen marks on top of a photo and start looking like the image is re-expressing itself as hatching.
That one change does a lot. Draw a few hundred of these over a portrait and the strokes in the skin region pick up skin tones, strokes in the background pick up background tones - the whole thing blends into a woven, textured version of the original instead of a photo with crayon on it. It's the node I'd reach for first when the goal is "make this render feel hand-made." Because there are no RGB inputs at all, it's impossible to get a color-mismatch result: the palette is the image.
How it works
Same skeleton as RandomLines - random start point, random angle, random length around your avg_length, random thickness around avg_thickness - but two differences worth naming. First, the color comes from sample_color_at_point(), which reads the pixel at the line's center and clamps to image bounds, so no out-of-bounds crashes. Second, alpha is jittered around your alpha by alpha_deviation, same as before. The inputs that matter:
- num_lines (1–100000) - density. The ceiling is enormous; start around 100–500 and let it stack.
- avg_thickness / thickness_deviation - stroke weight. Thin reads as pencil, thick reads as paint.
- avg_length / length_deviation - stroke length. Long strokes cross regions, short ones stay local.
- alpha / alpha_deviation - opacity. Low alpha builds up soft layered hatching.
Two things the source tells you
There's no seed input - results aren't reproducible run to run, same as RandomLines. And this node (along with the circle and rectangle variants) saves a temporary PNG preview and returns a UI image, so you'll actually see a preview thumbnail on the node after a run - a nice touch the plainer nodes lack. Only the first image of a batch is processed, as with the rest of the pack.
Install
Part of dymokomi/comfyui_dygen by Dy Mokomi. ComfyUI Manager → search "comfyui_dygen", or:
cd ComfyUI/custom_nodes
git clone https://github.com/dymokomi/comfyui_dygen
Restart. No extra deps, no models.
The honest take
If you're choosing between this and RandomLines, pick this one unless you specifically want a fixed-color scribble. The adaptive version gives you the same texture with none of the "wrong color" risk and a much more integrated look. Keep num_lines moderate on first pass - with a high count and big alpha, the overlay can bury the image under its own hatching, and since there's no undo and no seed, you'll be re-running to dial it in.
Inputs (8)
| Name | Type | Default | Description |
|---|---|---|---|
| image | IMAGE | — | |
| num_lines | INT | 101–100000 | — |
| avg_thickness | FLOAT | 2.00.1–100 | — |
| thickness_deviation | FLOAT | 1.00–50 | — |
| avg_length | INT | 1001–2000 | — |
| length_deviation | INT | 500–1000 | — |
| alpha | INT | 2550–255 | — |
| alpha_deviation | INT | 200–255 | — |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| IMAGE | IMAGE | — |