回答:
以下の画像を取得するには、次を使用します。
curl -s https://gist.githubusercontent.com/HaleTom/89ffe32783f89f403bba96bd7bcd1263/raw/ | bash
要旨bash/ zshコードでshellcheck清潔、またサポート「馬なしサブプロセスを見て!」。
または、bash迅速に:
for i in {0..255} ; do
    printf "\x1b[48;5;%sm%3d\e[0m " "$i" "$i"
    if (( i == 15 )) || (( i > 15 )) && (( (i-15) % 6 == 0 )); then
        printf "\n";
    fi
done
総やり過ぎのために、たくさんの祖父はterminal-colors、572行のスクリプト複数持つ出力フォーマット。
トゥルーカラー(24ビット)テストパターンを印刷することもできます。
terminal-colors、ないcurl -s https://raw.githubusercontent.com/eikenb/terminal-colors/master/terminal-colors | python
                    terminal-colorsですか?また、私が提案したオプションと比較してどうですか?
                    Justin Abrahmsによって書かれたGitHubで、色の16進コードも印刷するPythonスクリプトを見つけました。
スクリプトを現在の作業ディレクトリにダウンロードします
wget https://gist.githubusercontent.com/justinabrahms/1047767/raw/a79218b6ca8c1c04856968d2d202510a4f7ec215/colortest.py
実行許可を与える
chmod +x colortest.py
それを実行します:
./colortest.py
リンク腐敗の場合の完全なスクリプトは次のとおりです。
#!/usr/bin/env python
# Ported to Python from http://www.vim.org/scripts/script.php?script_id=1349
print "Color indexes should be drawn in bold text of the same color."
print
colored = [0] + [0x5f + 40 * n for n in range(0, 5)]
colored_palette = [
    "%02x/%02x/%02x" % (r, g, b) 
    for r in colored
    for g in colored
    for b in colored
]
grayscale = [0x08 + 10 * n for n in range(0, 24)]
grayscale_palette = [
    "%02x/%02x/%02x" % (a, a, a)
    for a in grayscale 
]
normal = "\033[38;5;%sm" 
bold = "\033[1;38;5;%sm"
reset = "\033[0m"
for (i, color) in enumerate(colored_palette + grayscale_palette, 16):
    index = (bold + "%4s" + reset) % (i, str(i) + ':')
    hex   = (normal + "%s" + reset) % (i, color)
    newline = '\n' if i % 6 == 3 else ''
    print index, hex, newline, 
              されていないが、かなり「テストパターン」、私が持っているのxterm-カラーチューを:
curl -s https://raw.githubusercontent.com/grawity/code/master/term/xterm-color-chooser | python3
                    :まだ私が書いた別のスクリプトは、VTEリポジトリに位置していますhttps://git.gnome.org/browse/vte/plain/perf/256test.sh?h=vte-0-38。
120以上の列のウィンドウが必要ですが、6x6x6キューブの色をきれいにコンパクトに配置します。インデックスの最初の桁はコンパクトにするために取り除かれているため、簡単に把握できます。垂直バーを使用すると、アンチエイリアシングを無効にせずに、前景色の正確なRGBを調べることができます(数字のように)。
出力の上部(下のスクリーンショットには表示されていません)は、太字と明るい曖昧さを伴う狂気を示しています。明るい対応色。新しいスタイル(256色対応)エスケープシーケンスでは、最初の8色でもそうではありません。少なくとも、これがxtermとVTE(GNOME端末など)の動作です。
このスクリーンショットは、出力の約半分を示しています。
curl -s -L https://git.gnome.org/browse/vte/plain/perf/256test.sh?h=vte-0-38 | bash
                    おそらく不要ですが、背景を使用して自動シェル幅検出を使用して256色を印刷するバージョンを作成し、色がより簡単に見えるようにしました。
https://gist.github.com/WoLpH/8b6f697ecc06318004728b8c0127d9b3
#!/usr/bin/env python
from __future__ import print_function
import os
import shutil
import subprocess
def get_width(default=80):
    '''Attempt to detect console width and default to 80'''
    try:
        columns, rows = shutil.get_terminal_size()
    except AttributeError:
        try:
            _, columns = subprocess.check_output(['stty', 'size']).split()
        except OSError:
            columns = os.environ.get('COLUMNS', default)
    columns = int(columns) - 77
    # Since we have 6 columns with 1 space on each side, we can increment the
    # size for every 12 extra columns
    return max(0, columns / 12)
# Loosely based on https://gist.github.com/justinabrahms/1047767
colored = [0] + list(range(95, 256, 40))
colored_palette = [
    (r, g, b)
    for r in colored
    for g in colored
    for b in colored
]
grayscale_palette = [(g, g, g) for g in range(8, 240, 10)]
esc = '\033['
# Reset all colors sequence
reset = esc + '0m'
# Regular color
normal = esc + '38;5;{i}m'
# Bold color
bold = esc + '1;' + normal
# Background color
background = esc + '48;5;{i}m'
pattern = (
    '{normal}{background}{padding:^{width}}{i:^3d} '  # pad the background
    '{r:02X}/{g:02X}/{b:02X}'  # show the hex rgb code
    '{padding:^{width}}'  # pad the background on the other side
    '{reset}'  # reset again
)
base_context = dict(reset=reset, padding='', width=get_width())
for i, (r, g, b) in enumerate(colored_palette + grayscale_palette, 16):
    context = dict(i=i, r=r, g=g, b=b, color=r + g + b, **base_context)
    context.update(bold=bold.format(**context))
    context.update(background=background.format(**context))
    # Change text color from black to white when it might become unreadable
    if max(r, g, b) > 0xCC:
        context.update(normal=normal.format(i=0))
    else:
        context.update(normal=normal.format(i=255))
    print(pattern.format(**context), end='')
    # Print newlines when needed
    if i % 6 == 3:
        print()
    else:
        print(' ', end='')
              curl https://gist.githubusercontent.com/WoLpH/8b6f697ecc06318004728b8c0127d9b3/raw/250eb2e3f2acca1c51aa52adf611ec0380291e8a/colortest.py | python3
                    curl -s https://gist.githubusercontent.com/WoLpH/8b6f697ecc06318004728b8c0127d9b3/raw/colortest.py | python3
                    
/cubesirssi(ソース)