Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

base16 colors are wrong starting in 0.14.0 #979

Closed
lilyball opened this issue May 7, 2020 · 3 comments
Closed

base16 colors are wrong starting in 0.14.0 #979

lilyball opened this issue May 7, 2020 · 3 comments
Labels
bug Something isn't working

Comments

@lilyball
Copy link

lilyball commented May 7, 2020

What version of bat are you using?
bat 0.15.0

Describe the bug you encountered:
I'm using the base16 theme, with a dark terminal. bat 0.13.0 renders output as expected, and in a way consistent with other tools configured with a base16 theme. However bat 0.15.0 renders comments using the base00 color, which is black and matches my background. This makes comments invisible (modulo the fact that my terminal background is semi-transparent).

This is in Terminal.app on macOS. If it matters, Terminal.app supports 256 colors but not customizable RGB colors, though the base16 theme should only be using the first 16 colors anyway.

Screenshot of bat 0.13.0 Screen Shot 2020-05-07 at 1 59 37 PM
Screenshot of bat 0.15.0 Screen Shot 2020-05-07 at 1 59 50 PM

Also from these screenshots I can see the {0.2} changed from orange to red. This is the same underlying issue.

It looks like this is caused by 319ab77, which teaches bat explicitly about base16 colors, except bat's only using the lower 8 colors, with a TODO comment saying it should be using high-intensity variants. The lack of high intensity variants is in fact a huge problem.

Describe what you expected to happen?
bat 0.15.0 shouldn't render colors any differently than bat 0.13.0.

How did you install bat?
Nix


system

$ uname -srm
Darwin 19.4.0 x86_64

$ sw_vers
ProductName: Mac OS X
ProductVersion: 10.15.4
BuildVersion: 19E287

bat

$ bat --version
bat 0.15.0

$ env

bat_config

$ cat /Users/lily/.config/bat/config

--theme="base16"
--italic-text=always

bat_wrapper

$ cat /nix/store/dr1d3f2p48izs3bc7873bal5np9mcajl-bat-0.15.0/bin/bat

#! /nix/store/8wg8zdcq0iyx2hdqvc44h5z7cwy95s3c-bash-4.4-p23/bin/bash -e
export PATH='/nix/store/jn33gx66h053w6xijwixsnsn3vaj0qyn-less-551/bin'${PATH:+':'}$PATH
exec -a "$0" "/nix/store/dr1d3f2p48izs3bc7873bal5np9mcajl-bat-0.15.0/bin/.bat-wrapped"  "$@"

bat_wrapper_function

No wrapper function for 'bat'.

No wrapper function for 'cat'.

tool

$ less --version
less 487 (POSIX regular expressions)

@lilyball lilyball added the bug Something isn't working label May 7, 2020
@sharkdp
Copy link
Owner

sharkdp commented May 10, 2020

Thank you for reporting this. I accidentally broke this with #934. See the fix in #972.

@sharkdp
Copy link
Owner

sharkdp commented May 11, 2020

closed via #972 by @mk12

@sharkdp sharkdp closed this as completed May 11, 2020
@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
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants