広告が嫌いですか? 行く 広告なし 今日

ANSI Terminal Color Code Generator

開発者文章

Preview Text

Text shown in the live terminal preview.

Color Mode

Pick a palette. 16-color works everywhere; 256-color works in modern terminals; true-color requires a 24-bit terminal.

前景


背景


Text Styles


出力フォーマット

How the ESC character is written. Choose the form that matches your language or shell.

Terminal Preview

Active SGR Codes

コードスニペット

ガイド

ANSI Terminal Color Code Generator

ANSI Terminal Color Code Generator

Build ANSI escape sequences (Select Graphic Rendition codes) for coloring and styling terminal output. Pick a foreground and background color, toggle styles like bold or underline, and get a ready-to-paste escape string plus a live preview of how it renders in a terminal.

使用方法

  1. Type the sample text you want to style in the Sample Text field (for example, Error: file not found).
  2. [ブラウザのchrome]を選択し、 Color Mode: Basic (16 colors) for maximum compatibility, 256-color for richer palettes, or True color (24-bit RGB) for any hex color.
  3. Pick a foreground and (optionally) background color. Toggle text styles such as bold, italic, underline, or blink.
  4. Select the Escape Prefix that matches your language: \033[ (C / Python), \x1b[ (Node), or \e[ (bash).
  5. Copy the escape string, the wrapped sample (escape + text + reset), or the ready-made Python / Node / Bash snippet.

機能

  • Three color modes – 16-color SGR (30-37 / 90-97 / 40-47 / 100-107), xterm 256-color palette (38;5;N / 48;5;N), and 24-bit true-color (38;2;R;G;B / 48;2;R;G;B).
  • Full style coverage – Bold (1), Dim (2), Italic (3), Underline (4), Blink (5), Reverse video (7), and Strikethrough (9).
  • Live terminal preview – Renders the styled text in a dark terminal pane so you can see the result before pasting it anywhere.
  • Multiple escape formats – Pick between \033[, \x1b[, \e[, or a raw ESC byte to match the language or shell you are targeting.
  • Copy-ready code snippets – Auto-generated print(), console.log()と、 printf examples that wrap your sample text with the chosen escape and a trailing reset.
  • Active SGR badges – A summary of every SGR parameter currently active, including the human-readable color name and the numeric code.

よくある質問

  1. What is an ANSI escape sequence?

    An ANSI escape sequence is a special string that starts with the ESC control character (0x1B) and is recognized by terminal emulators as a command rather than printable text. The most common form is the Control Sequence Introducer (CSI), written as ESC followed by an open bracket, which is used to move the cursor, clear parts of the screen, and most relevantly here, change text colors and styles through Select Graphic Rendition (SGR) parameters.

  2. What does SGR stand for in ANSI codes?

    SGR stands for Select Graphic Rendition. It is the subset of ANSI CSI sequences that ends with the letter m and carries one or more numeric parameters that control display attributes such as foreground color, background color, boldness, italics, underline, and blink. SGR codes were standardized in ECMA-48 and ISO/IEC 6429.

  3. Why are there three different color modes?

    Terminals evolved over time. The original VT100 family supported only eight colors plus eight bright variants, which became the 16-color SGR range (30 to 37, 90 to 97 for foreground). xterm later introduced an indexed 256-color palette accessed with 38;5;N. Modern terminals can address any RGB color using 38;2;R;G;B, often called true-color or 24-bit color. Each mode trades capability for backward compatibility.

  4. What does a reset code do?

    The reset sequence, written as ESC [ 0 m, clears every previously set SGR attribute and returns the terminal to its default foreground color, default background color, and default text styles. Without a trailing reset, the chosen color or style would continue to apply to whatever text the program prints next, which is rarely desired.

  5. Why do some terminals ignore the blink code?

    Blinking text (SGR code 5) is technically part of the standard, but most modern terminal emulators either render it as bold, render it without animation, or ignore it entirely. The behaviour depends on the emulator and on user accessibility preferences, since flashing text can trigger discomfort or seizures. Tools that need to attract attention typically rely on reverse video or bright colors instead.

広告なしで楽しみたいですか? 今すぐ広告なしで

拡張機能をインストールする

お気に入りのブラウザにIOツールを追加して、すぐにアクセスし、検索を高速化します。

に追加 Chrome拡張機能 に追加 エッジ拡張 に追加 Firefox 拡張機能 に追加 Opera 拡張機能

スコアボードが到着しました!

スコアボード ゲームを追跡する楽しい方法です。すべてのデータはブラウザに保存されます。さらに多くの機能がまもなく登場します!

ニュースコーナー 技術ハイライト付き

参加する

価値ある無料ツールの提供を継続するためにご協力ください

コーヒーを買って