ComfyUI Node
Luminosity Masking
A ComfyUI node in ComfyUI-JH-PixelPro/color with 5 inputs and 3 outputs.
Luminosity Masking
- image
- mask_shadows
- mask_midtones
- mask_highlights
◄luminance_sourcelab_l►
◄shadow_end0.33►
◄highlight_start0.67►
◄soft_edge0.10►
CategoryComfyUI-JH-PixelPro/color
Inputs (5)
| Name | Type | Default | Description |
|---|---|---|---|
| image | IMAGE | — | |
| luminance_source | COMBO | lab_l | Luminance channel. 'lab_l' is perceptual (Photoshop default, ~120ms @ 2K CPU). 'ycbcr_y' is fast (~7ms @ 1024 CPU) — use for realtime preview. 'hsv_v' is simple max-RGB and less perceptual. |
| shadow_end | FLOAT | 0.330–0.5 | Upper bound of the shadow band. Luminance values below this (minus half of soft_edge) count fully as shadow. |
| highlight_start | FLOAT | 0.670.5–1 | Lower bound of the highlight band. Luminance values above this (plus half of soft_edge) count fully as highlight. Must be > shadow_end. |
| soft_edge | FLOAT | 0.100.01–0.3 | Smoothstep transition width at both band edges. Smaller = sharper bands, larger = smoother blend. Partition-of-unity preserved: shadows + midtones + highlights ≈ 1. |
Outputs (3)
| Name | Type | Description |
|---|---|---|
| mask_shadows | MASK | — |
| mask_midtones | MASK | — |
| mask_highlights | MASK | — |