Get the FREE Ultimate OpenClaw Setup Guide →

ascii-ansi-colorizer

npx machina-cli add skill partme-ai/full-stack-skills/ascii-ansi-colorizer --openclaw
Files (1)
SKILL.md
2.2 KB

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-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 中文: ascii-ansi-colorizer, ANSI, 上色, 渐变, 彩虹, 终端, 无色回退, 纯文本, ASCII

Source

git clone https://github.com/partme-ai/full-stack-skills/blob/main/skills/ascii-ansi-colorizer/SKILL.mdView on GitHub

Overview

ascii-ansi-colorizer adds an ANSI color layer to existing ASCII or plain-text output, enabling gradients, rainbows, and highlights. It preserves alignment by colorizing only visible characters and provides a required no-color fallback for non-color environments.

How This Skill Works

The tool takes textOrAscii along with palette, direction, colorDepth, and scope, and outputs coloredText plus plainTextFallback. It ensures alignment remains intact by avoiding coloring spaces, and relies on the scripts/colorize.py to apply either ANSI 16/256 or truecolor gradients. Compatibility notes guide NO_COLOR usage for non-color terminals.

When to Use It

  • You want to apply a gradient or rainbow color layer to an ASCII logo or text without altering its layout.
  • You need reliable, alignment-safe coloring for terminal outputs where only visible characters are colored.
  • You require a no-color fallback so downstream scripts or environments can reproduce plain text when colors are disabled.
  • You are implementing branding or emphasis using palette options (rainbow, gradient, or brandColors) while preserving content readability.
  • You need clear compatibility guidance for NO_COLOR / --no-color in documentation or automation scripts.

Quick Start

  1. Step 1: Choose colorDepth (default ansi256) and a palette (rainbow, gradient, brandColors).
  2. Step 2: Set direction (leftToRight or topToBottom) and scope (logoOnly, highlightsOnly, fullText).
  3. Step 3: Run scripts/colorize.py on your text to produce coloredText and plainTextFallback; include compatNotes with NO_COLOR guidance.

Best Practices

  • Color only visible characters; avoid coloring spaces to keep alignment intact.
  • Always output both coloredText and plainTextFallback to support color-enabled and color-free environments.
  • Start with a stable strategy (leftToRight column gradients) to minimize layout shifts.
  • Choose colorDepth to match terminal capabilities (ansi256 by default, upgrade to truecolor if supported).
  • Provide explicit NO_COLOR guidance for downstream users and scripts.

Example Use Cases

  • A CLI tool banner with a rainbow gradient at startup while preserving line alignment.
  • A gradient ASCII progress bar that remaining content stays readable in the console.
  • Brand-colored headers in an ASCII table without distorting column positions.
  • Colored ASCII charts where axes and labels remain alignment-safe.
  • Help text with a no-color fallback documented for non-color environments.

Frequently Asked Questions

Add this skill to your agents
Sponsor this space

Reach thousands of developers