zsh-users
 help / color / mirror / code / Atom feed
From: Sebastian Gniazdowski <sgniazdowski@gmail.com>
To: Zsh Users <zsh-users@zsh.org>
Subject: Terminal theme tool – a workaround for lack of 24-bit color in Zsh?
Date: Mon, 15 Oct 2018 17:28:34 +0200	[thread overview]
Message-ID: <CAKc7PVCEmTTMRR0P3kx9ktpLDBYqJ+MRsE77UMLFjonEZAixfA@mail.gmail.com> (raw)

Hello!
There are 2 escape sequences, ESC]4;n;#rrggbb\a and ESC]Pnrrggbb, that
allow to change terminal's current palette. First works on most
OpenSource / Linux terminals and supports 256 colors, second one on OS
X iTerm, supporting first 16 colors only. (I've submitted a ticket for
1st code on iTerm GitLab project page
https://gitlab.com/gnachman/iterm2/issues/7221, you could support it
by commenting in favor of the feature or by giving thumbs up).

I'm wondering why there is no tool to manage terminal-themes? Many
things, in particular syntax highlighting of Zsh command-line, can
easily gain from this. It's essentially a workaround for the lack of
24-bit color in Zsh. As a result I've decided to extend F-Sy-H theme
support with terminal-palette altering, it should be there within a
month.

I'm curious on opinions whether this really is a workaround for no
true-color support in Zsh and maybe on ideas of what such
terminal-theme manager should do.

You can play with this feature – xterm, urxvt, gnome-terminal:

echo -e '\e[32m'Test Color Text ▓▓▓▓'\e[0m'
sleep 2
echo -ne '\e]4;2;#aaaa00\a'

OS X / iTerm:

echo -e '\e[32m'Test Color Text ▓▓▓▓'\e[0m'
sleep 2
echo -en '\e]P2aaaa00'

-- 
Sebastian Gniazdowski
News: https://twitter.com/ZdharmaI
IRC: https://kiwiirc.com/client/chat.freenode.net:+6697/#zplugin
Blog: http://zdharma.org

             reply	other threads:[~2018-10-15 15:29 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-10-15 15:28 Sebastian Gniazdowski [this message]
2018-11-15 14:48 ` Sebastian Gniazdowski
2018-11-19 12:07 ` Magnus Woldrich
2018-11-22 14:43   ` Sebastian Gniazdowski
2018-11-22 17:15     ` Magnus Woldrich
2018-11-22 19:06 ` Sebastian Gniazdowski

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=CAKc7PVCEmTTMRR0P3kx9ktpLDBYqJ+MRsE77UMLFjonEZAixfA@mail.gmail.com \
    --to=sgniazdowski@gmail.com \
    --cc=zsh-users@zsh.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.vuxu.org/mirror/zsh/

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).