ascii-image-to-ascii
$
npx mdskill add partme-ai/full-stack-skills/ascii-image-to-asciiConverts local images into ASCII art with readable and detail variants, width/charset controls, and optional ANSI coloring for terminal previews.
- Helps generate plain-text image substitutes for terminal displays or text-based applications.
- Depends on Python 3.8 or higher and the Pillow library for image processing.
- Triggers only when the user explicitly mentions the skill name, such as 'ascii-image-to-ascii'.
- Outputs include readable and detail ASCII versions, parameter guides, and pre-processing tips.
SKILL.md
.github/skills/ascii-image-to-asciiView on GitHub ↗
---
name: ascii-image-to-ascii
description: “Convert an image into ASCII art (readable + detail variants, width/charset controls, optional ANSI), for terminal previews and plain-text image substitutes.”
license: Complete terms in LICENSE.txt
dependencies:
- python>=3.8
- pillow
---
## When to use this skill
**CRITICAL TRIGGER RULE**
- Use this skill ONLY when the user explicitly mentions the exact skill name: `ascii-image-to-ascii`.
**Trigger phrases include:**
- "ascii-image-to-ascii"
- "use ascii-image-to-ascii"
- "用 ascii-image-to-ascii 把图片转字符画"
- "使用 ascii-image-to-ascii 生成可读优先/细节优先两版"
## Boundary
- Default output is ASCII-only; ANSI coloring is optional.
- The bundled script is for local conversion/verification only. Do not fetch/upload images on the user’s behalf.
- Always give pre-processing advice (crop subject, raise contrast, simplify background) before generating the final ASCII art.
## How to use this skill
### Inputs
- imagePath (local path, required)
- width (default 100; common: 80/100/120)
- charset (default ` .:-=+*#%@`, from light to dark)
- mode (readable | detail; if outputting both, this can be ignored)
- background (light | dark | unknown, default unknown)
- colorMode (none | ansi256, default none)
### Outputs (required)
- asciiReadable: readable-first (less noise, clearer silhouette)
- asciiDetail: detail-first (more levels, richer texture)
- paramsGuide: recommended width/charset + pre-processing tips
- pitfalls: 3-5 common failure modes with fixes
### Steps
1. Pre-processing advice (required):
- Crop the subject, remove irrelevant background
- Increase contrast to reduce gradient noise
- Target width usually 80–120 columns
2. Charset + mapping direction:
- Space is the lightest, `@` is the darkest (or invert consistently)
3. Generate two variants:
- readable: fewer levels (less noise)
- detail: more levels (more texture)
4. Optional ANSI:
- Use color only as a hint; keep the silhouette readable
- Always provide a no-color fallback
## Script
- `scripts/image_to_ascii.py`
- Requires Python + Pillow (`pip install pillow`)
- Supports: readable/detail variants, optional `--ansi256`
### Sample Output Comparison
**Readable variant** (fewer levels, clearer silhouette):
```
.:::.
.=*##*=.
.+######+.
.:########:.
.+########+.
:*######*:
.=*##*=.
.:::.
```
**Detail variant** (more levels, richer texture):
```
.:=+:.
.-+*##*+-.
.=*######*=.
.:*########*:.
.=*########*=.
:+*######*+:
.-+*##*+-.
.:=+:.
```
## Examples
- `examples/readable-vs-detail.md`
## Quality checklist
1. Lines are consistent and `<= width`
2. The readable variant must preserve the main silhouette
3. No trailing spaces (copy/paste safe)
## Keywords
**English:** ascii-image-to-ascii, image to ascii, ascii art, terminal preview, charset, grayscale, dithering, ansi
**中文:** ascii-image-to-ascii, 图片转字符画, ASCII 字符画, 终端预览, 字符集, 灰度映射, 降噪, ANSI 彩色
More from partme-ai/full-stack-skills
- adobe-xd"Guides creation of UI/UX designs, interactive prototypes, reusable components, and design specs in Adobe XD. Use when the user asks about Adobe XD artboards, prototype links, repeat grids, component states, design tokens export, or developer handoff."
- angular"Provides comprehensive guidance for Angular framework including components, modules, services, dependency injection, routing, forms, and TypeScript integration. Use when the user asks about Angular, needs to create Angular applications, implement Angular components, or work with Angular features."
- ansible"Provides comprehensive guidance for Ansible automation including playbooks, roles, inventory, and module usage. Use when the user asks about Ansible, needs to automate IT tasks, create Ansible playbooks, or manage infrastructure with Ansible."
- ant-design-mini"Builds mini-program UIs with Ant Design Mini components for Alipay and WeChat mini-programs. Covers Button, Form, List, Modal, Tabs, NavBar, and 60+ components with theme customization and CSS variable theming. Use when the user needs to create mini-program interfaces with Ant Design Mini, configure themes, or implement mini-program-specific UI patterns."
- ant-design-mobile"Builds React mobile UIs with Ant Design Mobile (antd-mobile) components including Button, Form, List, Modal, Picker, Tabs, PullToRefresh, InfiniteScroll, and 50+ mobile-optimized components. Use when the user needs to create mobile-first React interfaces, implement mobile navigation, forms, or data display with Ant Design Mobile."
- ant-design-react"Builds enterprise React UIs with Ant Design (antd) including 60+ components (Button, Form, Table, Select, Modal, Message), design tokens, TypeScript support, and ConfigProvider theming. Use when the user needs to create React applications with Ant Design, build forms with validation, display data tables, or customize the Ant Design theme."
- ant-design-vueProvides comprehensive guidance for Ant Design Vue (AntDV) component library for Vue 3. Covers installation, usage, API reference, templates, and all component categories. Use when building enterprise-class UI with Vue 3 and Ant Design.
- api-doc-generator"Generate API documentation by scanning Controller classes, extracting endpoint URLs, HTTP methods, parameters, and response structures, then producing standardized docs from templates. Use when the user explicitly mentions generating API documentation, creating API docs, scanning interfaces, or documenting REST APIs. Do not trigger for generic documentation requests without explicit API mention."
- appium"Provides comprehensive guidance for Appium mobile testing including mobile app automation, element location, gestures, and cross-platform testing. Use when the user asks about Appium, needs to test mobile applications, automate mobile apps, or write Appium test scripts."
- ascii-ansi-colorizer"Add an ANSI color layer to existing ASCII/plain-text output (gradient/rainbow/highlights) with alignment-safe rules and a required no-color fallback. Use when the user wants to colorize terminal output, add rainbow effects to CLI text, or style ASCII art with ANSI colors."