A ComfyUI node that creates customizable ring-shaped highlights around masked areas in images or video frames. This node is useful for creating attention-drawing effects, highlighting specific regions, or creating decorative borders around subjects.
- images: Batch of input images
- mask: Input mask defining the area to create rings around
-
stroke_width (0 - 999, default: 20)
- Controls the thickness of the ring
- Measured in pixels
- Higher values create thicker rings
- Value of 0 creates no ring
-
stroke_blur (0 - 100, default: 6)
- Controls the softness of the ring edges
- Higher values create softer, more diffused edges
- Value of 0 creates sharp edges
- Useful for creating natural-looking transitions
-
highlight_color (String, default: "#FF0000")
- Color of the ring highlight
- Accepts two formats:
- Hex color codes (e.g., "#FF0000" for red)
- RGB values as comma-separated floats (e.g., "1.0,0.0,0.0" for red)
-
background_color (String, default: "#000000")
- Color of the area outside the ring
- Accepts same formats as highlight_color
- Usually set to black (#000000) for transparency
-
highlight_opacity (0.0 - 1.0, default: 0.8)
- Controls the transparency of the ring
- 1.0 is fully opaque
- 0.0 is fully transparent
- Useful for subtle effects or overlays
The node returns two outputs:
-
preview (IMAGE)
- Colored visualization of the ring effect
- Useful for previewing the effect in the workflow
- Shows the ring with applied colors and opacity
-
ring_mask (MASK)
- Grayscale mask of the ring shape
- Useful for further processing or compositing
- Values range from 0 (transparent) to 1 (opaque)
- Uses morphological operations (dilation/erosion) to create ring shapes
- Applies Gaussian blur for edge softening
- Handles both single frames and batched inputs
- Automatically scales mask values to appropriate range
- Supports both hex color codes and normalized RGB values
- Converts all colors to normalized RGB (0-1 range) internally
- Applies colors with proper alpha compositing
- Handles invalid color inputs gracefully with fallback to black
-
For Sharp Highlight Rings:
- Use higher stroke_width values (40-100)
- Keep stroke_blur low (0-2)
- Set highlight_opacity to 1.0
- Use bright highlight_color
-
For Subtle Glows:
- Use moderate stroke_width (10-30)
- Increase stroke_blur (10-20)
- Lower highlight_opacity (0.3-0.6)
- Use softer highlight colors
-
For Animated Effects:
- Feed animated masks as input
- Ring will automatically follow mask changes
- Useful for tracking or emphasis effects
-
For Complex Compositing:
- Use the ring_mask output
- Combine with other effects
- Create custom color gradients
- Layer multiple rings with different settings
-
Subject Highlighting:
- Highlight main subjects in videos
- Create attention-drawing effects
- Emphasize specific areas
-
Transition Effects:
- Create ring wipes
- Generate reveal effects
- Build focus transitions
-
UI Elements:
- Create interactive highlights
- Build selection indicators
- Design animated borders
-
Creative Effects:
- Generate decorative frames
- Create energy effects
- Design abstract animations