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"
- "Colorizing ASCII with ascii-ansi-colorizer"
- "Using ascii-ansi-colorizer for ANSI gradients/rainbows"
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.
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 Chinese: ascii-ansi-colorizer, ANSI, coloring, gradient, rainbow, terminal, no-color fallback, plain text, ASCII
Common Gotchas
- Version Compatibility: Pay attention to compatibility between framework versions and dependency libraries; APIs may differ across versions
- Configuration File Format: Configuration file format errors are the most common issue; it is recommended to use your editor's syntax checking
- Environment Variables: Ensure all necessary environment variables are set correctly, and do not hardcode sensitive information
- Dependency Conflicts: When multiple versions coexist, watch out for dependency conflicts and use a lock file to pin versions
- Performance Pitfalls: In large-data scenarios, pay attention to performance optimization and avoid common issues such as N+1 queries
Usage Flow
Step 1: Environment Preparation
Ensure the necessary dependencies and tools are installed in the development environment.
Step 2: Configuration Initialization
Perform basic configuration according to project requirements.
Step 3: Using Core Features
Implement the core functionality according to the example code.
Step 4: Testing and Verification
Run tests to ensure the functionality works properly.
Step 5: Deployment and Release
After development is complete, proceed with deployment and monitoring.