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

Blue channel offset by 1 with kitty without transparency #767

Closed
SirLarion opened this issue Sep 3, 2024 · 2 comments · Fixed by #786
Closed

Blue channel offset by 1 with kitty without transparency #767

SirLarion opened this issue Sep 3, 2024 · 2 comments · Fixed by #786
Labels
bug Something isn't working

Comments

@SirLarion
Copy link

SirLarion commented Sep 3, 2024

Description

Hello!

I was very confused for some time when everything in my customized theme looked slightly bluer than expected. After some digging I ran into this workaround for a kitty bug in catppuccin/palettes/init.lua

if O.kitty then -- https://github.com/kovidgoyal/kitty/issues/2917
  for accent, hex in pairs(ans) do
    local red_green_string = hex:sub(1, 5)
    local blue_value = tonumber(hex:sub(6, 7), 16)

    -- Slightly increase or decrease brightness of the blue channel
    blue_value = blue_value == 255 and blue_value - 1 or blue_value + 1
    ans[accent] = string.format("%s%.2x", red_green_string, blue_value)
  end
end

As I understand it, this workaround is meant only for when the background has transparency. If this is the case, then I think the check should be for if O.kitty and O.transparent_background then ...

I can work around it just by having #FAFAF9 instead of #FAFAFA but a little annoying regardless 😅

Neovim version

NVIM v0.10.1
Build type: Release
LuaJIT 2.1.1723675123

Terminal and multiplexer

kitty 0.36.1

Catppuccin version / branch / rev

catppuccin v1.9.0

Steps to reproduce

  1. Have a custom catppuccin theme. (i.e. use the color_overrides options), the issue is apparent
  2. nvim in kitty
  3. The problem is apparent in the colors

Expected behavior

Overriden colors should be as defined, not slightly offset

Actual behavior

All colors, including overriden ones, are slightly offset.

Repro

-- Any init.lua setup with catppuccin
@SirLarion SirLarion added the bug Something isn't working label Sep 3, 2024
@vollowx

This comment was marked as outdated.

@vollowx vollowx closed this as completed Oct 26, 2024
@vollowx vollowx closed this as not planned Won't fix, can't repro, duplicate, stale Oct 26, 2024
@sgoudham
Copy link
Contributor

sgoudham commented Oct 28, 2024

Hey 👋,

We've had to revert the PR that fixes this (#794) as it breaks the existing workaround for Kitty terminals. Unfortunately, the blue offset that you're encountering is currently expected behaviour and not a bug. I'll raise a PR in the future documenting this more clearly outside of the source code.

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

Successfully merging a pull request may close this issue.

3 participants