When to use this skill
CRITICAL TRIGGER RULE
- Use this skill ONLY when the user explicitly mentions the exact skill name:
ascii-ansi-colorizer.
Trigger phrases include:
- "ascii-ansi-colorizer"
- "use ascii-ansi-colorizer"
- "用 ascii-ansi-colorizer 给 ASCII 上色"
- "使用 ascii-ansi-colorizer 做 ANSI 渐变/彩虹"
Boundary
- This skill only adds color to existing text. It does not generate the ASCII art itself (pair with
ascii-cli-logo-bannerif needed). - Required outputs:
coloredText+plainTextFallback. - ANSI must not break alignment: do not colorize spaces by default; colorize visible characters only.
How to use this skill
Inputs
- textOrAscii (required)
- palette (rainbow | gradient | brandColors)
- direction (leftToRight | topToBottom, default leftToRight)
- colorDepth (ansi16 | ansi256 | truecolor, default ansi256)
- scope (logoOnly | highlightsOnly | fullText, default logoOnly)
Outputs (required)
- coloredText: ANSI-colored output
- plainTextFallback: no-color fallback (identical content, no ANSI)
- compatNotes: copy/paste and redirection guidance (NO_COLOR / --no-color suggestions)
Steps
- Pick
colorDepth(default: ansi256). - Choose a stable coloring strategy:
- Column-wise gradients (leftToRight) are usually the safest
- Colorize non-space characters only
- Output both
coloredTextandplainTextFallback. - Provide no-color guidance (semantic suggestions):
NO_COLOR/--no-color.
Output Format
Outputs should be structured as three distinct text blocks:
coloredText:
\033[38;5;33mH\033[38;5;34me\033[38;5;35ml\033[38;5;36ml\033[38;5;37mo\033[0m
plainTextFallback:
Hello
compatNotes:
- Respect NO_COLOR env var: if set, output plainTextFallback only
- Support --no-color flag for CLI tools
- Pipe/redirect: detect non-TTY and fall back to plain text
Workflow
- Receive text input and validate it is non-empty
- Select
colorDepth(default ansi256) andpalette - Apply coloring to visible characters only (skip spaces to preserve alignment)
- Generate both
coloredTextandplainTextFallback - Validate: Strip ANSI codes from
coloredTextand compare withplainTextFallback— they must match
Script
scripts/colorize.py: apply ANSI 256 gradient or rainbow to stdin
Examples
examples/gradient.md
Quality checklist
- Removing ANSI keeps the same readable content (
plainTextFallback). - Alignment does not change after coloring.
- Colors should not overpower the informational lines.
Keywords
English: ascii-ansi-colorizer, ansi, color, gradient, rainbow, terminal, no-color, plain text, ascii 中文: ascii-ansi-colorizer, ANSI, 上色, 渐变, 彩虹, 终端, 无色回退, 纯文本, ASCII