Skip to content

Conversation

@mk12
Copy link
Contributor

@mk12 mk12 commented May 2, 2020

This changes the base16 theme back from #RRGGBB0f to #RRGGBB00,
reverting part of #934. That PR used the 0f encoding to produce ANSI
escape sequences 30-37 and 40-47 rather than 38;5 and 48;5 which require
256-color support. Unfortunately, it resulted in base16 using the wrong
colors because ansi_term does not support the bright variants (90-97 and
100-107) so it simply mapped them to the non-bright colors.

This PR makes combines the 00 and 0f alpha encodings into 00, and makes
them use the Color enum for the first 8 colors and Fixed otherwise. This
means the ansi-light and ansi-dark themes will work on terminals without
256-color support, and base16 will render bright colors correctly.

Note: I have not updated themes.bin.

This changes the base16 theme back from #RRGGBB0f to #RRGGBB00,
reverting part of sharkdp#934. That PR used the 0f encoding to produce ANSI
escape sequences 30-37 and 40-47 rather than 38;5 and 48;5 which require
256-color support. Unfortunately, it resulted in base16 using the wrong
colors becuase ansi_term does not support the bright variants (90-97 and
100-107) so it simply mapped them to the non-bright colors.

This PR makes combines the 00 and 0f alpha encodings into 00, and makes
them use the Color enum for the first 8 colors and Fixed otherwise. This
means the ansi-light and ansi-dark themes will work on terminals without
256-color support, and base16 will render bright colors correctly.
@sharkdp
Copy link
Owner

sharkdp commented May 11, 2020

Thank you very much for the fix and the detailed documentation!

Note: I have not updated themes.bin.

👍 will do so before preparing the next release.

@sharkdp sharkdp merged commit f59d00d into sharkdp:master May 11, 2020
@mk12 mk12 deleted the fix-base16 branch May 11, 2020 17:59
@sharkdp
Copy link
Owner

sharkdp commented May 11, 2020

Released in v0.15.1

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants