SuperAPI AI Directory

ascii-ansi-colorizer

Design & creation

View repository

Updated 10-15 21:47

About this skill

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-banner if 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

  1. Pick colorDepth (default: ansi256).
  2. Choose a stable coloring strategy:
    • Column-wise gradients (leftToRight) are usually the safest
    • Colorize non-space characters only
  3. Output both coloredText and plainTextFallback.
  4. 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

  1. Removing ANSI keeps the same readable content (plainTextFallback).
  2. Alignment does not change after coloring.
  3. 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

  1. Version Compatibility: Pay attention to compatibility between framework versions and dependency libraries; APIs may differ across versions
  2. Configuration File Format: Configuration file format errors are the most common issue; it is recommended to use your editor's syntax checking
  3. Environment Variables: Ensure all necessary environment variables are set correctly, and do not hardcode sensitive information
  4. Dependency Conflicts: When multiple versions coexist, watch out for dependency conflicts and use a lock file to pin versions
  5. 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.