ascii-ansi-colorizer

Compare original and translation side by side

🇺🇸

Original

English
🇨🇳

Translation

Chinese

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 渐变/彩虹"
核心触发规则
  • 仅当用户明确提及确切技能名称:
    ascii-ansi-colorizer
    时,才可使用此技能。
触发短语包括:
  • "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.
  • 此技能仅为现有文本添加颜色,不生成ASCII艺术本身(如有需要可搭配
    ascii-cli-logo-banner
    使用)。
  • 必须输出:
    coloredText
    +
    plainTextFallback
  • ANSI代码不得破坏对齐:默认不对空格上色;仅对可见字符上色。

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)
  • textOrAscii(必填)
  • palette(rainbow | gradient | brandColors)
  • direction(leftToRight | topToBottom,默认值leftToRight)
  • colorDepth(ansi16 | ansi256 | truecolor,默认值ansi256)
  • scope(logoOnly | highlightsOnly | fullText,默认值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)
  • coloredText:带ANSI色彩的输出内容
  • plainTextFallback:无色彩回退内容(与原内容完全一致,无ANSI代码)
  • compatNotes:复制粘贴与重定向使用指南(建议使用NO_COLOR / --no-color参数)

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
    .
  1. 选择
    colorDepth
    (默认值:ansi256)。
  2. 选择稳定的上色策略:
    • 按列渐变(leftToRight)通常是最安全的选择
    • 仅对非空格字符上色
  3. 同时输出
    coloredText
    plainTextFallback
  4. 提供无色彩使用指南(语义化建议):
    NO_COLOR
    /
    --no-color

Script

脚本

  • scripts/colorize.py
    : apply ANSI 256 gradient or rainbow to stdin
  • scripts/colorize.py
    :为标准输入内容应用ANSI 256色渐变或彩虹效果

Examples

示例

  • examples/gradient.md
  • 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.
  1. 移除ANSI代码后仍保留可读的完整内容(即
    plainTextFallback
    )。
  2. 上色后文本对齐方式不改变。
  3. 颜色不应遮盖信息性文本内容。

Keywords

关键词

English: ascii-ansi-colorizer, ansi, color, gradient, rainbow, terminal, no-color, plain text, ascii 中文: ascii-ansi-colorizer, ANSI, 上色, 渐变, 彩虹, 终端, 无色回退, 纯文本, ASCII
英文: ascii-ansi-colorizer, ansi, color, gradient, rainbow, terminal, no-color, plain text, ascii 中文: ascii-ansi-colorizer, ANSI, 上色, 渐变, 彩虹, 终端, 无色回退, 纯文本, ASCII