From 9debcd3aaa5d6009bc00dbd4563d953c01e8a03e Mon Sep 17 00:00:00 2001 From: Solaris-star <820622658@qq.com> Date: Mon, 20 Jul 2026 02:02:38 +0800 Subject: [PATCH] docs: add color and glyph legend under README Preview MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Document the default category → color/glyph mapping so the preview screenshots are easier to read. Point readers at --print-color-table for a live reference. Closes #240. Signed-off-by: Solaris-star <820622658@qq.com> --- README.md | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) diff --git a/README.md b/README.md index e20d9124..080f4c66 100644 --- a/README.md +++ b/README.md @@ -17,6 +17,25 @@ of bytes (NULL bytes, printable ASCII characters, ASCII whitespace characters, o ![](https://i.imgur.com/f8nm8g6.png) +### Color and character legend + +With the default character table and color scheme, each byte category is shown +as follows (hex panel uses the color; the right-hand character panel uses the +glyph): + +| Category | Default color | Glyph | Byte range | +| --- | --- | --- | --- | +| NULL bytes | bright black | `⋄` | `0x00` | +| ASCII printable | cyan | as-is (`a`–`z`, …) | `0x20`–`0x7E` | +| ASCII whitespace | green | space or `_` | `0x09`–`0x0D`, `0x20` | +| Other ASCII (controls) | green | `•` | remaining `0x01`–`0x1F`, `0x7F` | +| Non-ASCII | yellow | `×` | `0x80`–`0xFF` | + +You can print a live color reference with: + +```bash +hexyl --print-color-table +``` ## Installation