---
title: "Discussion on \"ANSI的esc转义序列\" | Hashnode"
description: "Discussion on \"ANSI的esc转义序列\". 本文较完整第介绍了ANSI的转义序列，大多数都可以用于在普通终端上显示出较为漂亮的界面，本文可以作为一个资料备查。\nCSI序列\n\nCSI(Control Sequence Introducer)序列由 ESC [ 开始，后面跟若干个参数字节(可以没有)，规定范围为 0x30-0x3F(ASCII 0–9:;<=>?)；再跟若干个中间字节，规定范围为 0x20-0x2F(ASCII 空格以及!\"#$%&'()*+,-./)；然后再跟一个结束字符(单个字符)，规定范围为 0x40-0x7E(ASCI..."
url: "https://hashnode.com/posts/100003-ansi-escape-code/6350de2d6909949d77f1915e"
---

[Feed](https://hashnode.com/feed) /

Discussion

# [ANSI的esc转义序列](https://whowin.cn/100003-ansi-escape-code?utm_source=hashnode&utm_medium=feed)

本文较完整第介绍了ANSI的转义序列，大多数都可以用于在普通终端上显示出较为漂亮的界面，本文可以作为一个资料备查。 CSI序列 CSI(Control Sequence Introducer)序列由 ESC \[ 开始，后面跟若干个参数字节(可以没有)，规定范围为 0x30-0x3F(ASCII 0–9:;<=>?)；再跟若干个中间字节，规定范围为 0x20-0x2F(ASCII 空格以及!"#$%&'()\*+,-./)；然后再跟一个结束字符(单个字符)，规定范围为 0x40-0x7E(ASCI...

Apr 5, 2022 · 5 min read · whowin.cn  
Updated Oct 14, 2024  
Read the article

-   [#sgr](https://hashnode.com/tag/sgr)
-   [#ansi](https://hashnode.com/tag/ansi)
-   [#escape-code](https://hashnode.com/tag/escape-code)
-   [#csi](https://hashnode.com/tag/csi)
-   [#color-codes](https://hashnode.com/tag/color-codes)

## Written by

[whowin](https://hashnode.com/@whowin)

@whowin · Beijing, China

  
[View profile](https://hashnode.com/@whowin)

一枚有30多年经验的退休程序员，主要从事嵌入式软件开发

## Responses

Markdown supported · ⌘↵ to post

No responses yet.
