xterm-256color端末のデフォルトカラーパレットを変更できますか?

xterm-256color端末のデフォルトカラーパレットを変更できますか?

通常の16色xtermを使用すると、 "*color0:#"〜 "*color15:#"コマンドを使用して.Xresourcesファイルの色値を再割り当てできることがわかりました。

より多くの色を使用することを目的としてxterm-256colorに切り替えましたが、色の再割り当てはもはや機能しないようです。

256パレットを再配布する方法はありますか?それとも、より多くのカラーオプションを許可する別のxterm設定がありますか?

ベストアンサー1

エスケープシーケンスを使用してパレットをプログラムするか、またはtput

一つあるxterm ソースコードのスクリプトエスケープシーケンスを表示します。

256色(デフォルト)

そしてスクリプトを使ってパレットを反転させます。

256色(反転)

それはxterm確かに。 xtermに似たいくつかのツールはこの機能を(部分的に)実装するのに時間がかかりましたが、一部はまだ実装していません。

あなたできる256色のリソースをサポートするようにxtermをコンパイルしますが、次のUTF-8が失われます。手動:

           Resources past color15 are available as a compile-time option.
           Due to a hardcoded limit in the X libraries on the total number
           of resources (to 400), the resources for 256-colors are omitted
           when wide-character support and luit are enabled.  Besides
           inconsistent behavior if only part of the resources were
           allowed, determining the exact cutoff is difficult, and the X
           libraries tend to crash if the number of resources exceeds the
           limit.  The color palette is still initialized to the same
           default values, and can be modified via control sequences.

おすすめ記事