ComfyUI Node

ASCII Art

ASCII art: maps brightness to characters and renders them with a monospace font. Colour can be fixed, fade with brightness or be taken from the source image.

By X4Lch3mist·Created 2 months ago·Updated about a month ago· 0
ASCII Art
  • image
  • image
  • mask
  • text
◄charset .:-=+*#%@►
◄sort_by_densityfalse►
◄font_size12►
◄line_spacing1.00►
◄black_point0.10►
◄white_point0.95►
◄gamma1.00►
◄invertfalse►
◄color_modefade►
◄fg_color#33FF66►
◄bg_color#000000►
◄font_path►
CategoryX4Lch3mist/image

Inputs (13)

NameTypeDefaultDescription
imageIMAGE—
charsetSTRING .:-=+*#%@Characters from dark to bright. The first one (usually a space) is used for the darkest areas.
sort_by_densityBOOLEANfalseRe-order the charset by how much ink each glyph really has. Handy for custom charsets.
font_sizeINT124–128Character height in pixels. Smaller = more detail, bigger = more readable.
line_spacingFLOAT1.000.6–2—
black_pointFLOAT0.100–1Everything darker than this becomes empty background.
white_pointFLOAT0.950–1—
gammaFLOAT1.000.1–5—
invertBOOLEANfalseUse for dark text on a light background.
color_modeCOMBOfadefade: fg colour, dimmer in dark areas | fixed: one colour | source image: each character takes the colour of the picture.
fg_colorSTRING#33FF66—
bg_colorSTRING#000000—
font_pathoptSTRINGOptional path to a .ttf/.otf monospace font. Empty = Consolas / DejaVu Sans Mono / built-in.

Outputs (3)

NameTypeDescription
imageIMAGE—
maskMASK—
textSTRING—