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

Bug: 0x colors are not produced #73

Closed
Redhawk18 opened this issue Feb 19, 2024 · 6 comments
Closed

Bug: 0x colors are not produced #73

Redhawk18 opened this issue Feb 19, 2024 · 6 comments
Assignees
Labels
bug Something isn't working

Comments

@Redhawk18
Copy link

Describe the bug
colors using 0x prefix are not displayed

To Reproduce
Go here in nvim: https://github.com/iced-rs/iced/blob/c76a9eb2ff08ac242ed27d7fb11f536c1cc4411a/style/src/theme/palette.rs#L140

Expected behavior
they are displayed just like # colors

Screenshots
image

Operating System:
opensuse tumbleweed

Neovim Version:
0.9.5

Colorizer Version:
commit 85855b3

@Redhawk18 Redhawk18 added the bug Something isn't working label Feb 19, 2024
@kayuxx
Copy link

kayuxx commented Mar 4, 2024

@Redhawk18, this is not a bug. You need to use the AARRGGBB format like this: "0xffff0000"

@Redhawk18
Copy link
Author

Do you have an example, I'm on mobile rn.

@Redhawk18
Copy link
Author

@Redhawk18, this is not a bug. You need to use the AARRGGBB format like this: "0xffff0000"

I updated my config and do not see a differences
image

return {
    "NvChad/nvim-colorizer.lua",
    config = function()
        require("colorizer").setup({
            filetypes = { "*" },
            user_default_options = {
                RRGGBBAA = true, -- #RRGGBBAA hex codes
                AARRGGBB = true, -- 0xAARRGGBB hex codes
                rgb_fn = true,   -- CSS rgb() and rgba() functions
                hsl_fn = true,   -- CSS hsl() and hsla() functions
                css = true,      -- Enable all CSS features: rgb_fn, hsl_fn, names, RGB, RRGGBB
                css_fn = true,   -- Enable all CSS *functions*: rgb_fn, hsl_fn}
            }
        })
    end,
}

@kayuxx
Copy link

kayuxx commented Mar 11, 2024

@Redhawk18 you do it wrong. The first thing you need to do is to use the opts field.

return {
    "NvChad/nvim-colorizer.lua",
    opts = {
     user_default_options = {
      AARRGGBB = true, -- 0xAARRGGBB hex codes
     }
    },
}

It seems that the plugin does not support the hex format (e.g. 0xff00ff) that you want to achieve.
it should be 0xAARRGGBB so it will be like this 0xff00ffff

@Redhawk18
Copy link
Author

yeah it does not support it

@catgoose catgoose self-assigned this Nov 4, 2024
@catgoose
Copy link
Collaborator

catgoose commented Nov 6, 2024

Fixed via #91

@catgoose catgoose closed this as completed Nov 6, 2024
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

4 participants