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

How to colorize hsl colors if they are in this format --foreground: 222.2 47.4% 11.2% in css? #106

Open
AlejandroSanchez90 opened this issue Oct 11, 2024 · 0 comments
Assignees
Labels
bug Something isn't working

Comments

@AlejandroSanchez90
Copy link

Describe the bug
i have enabled hsl in the colorized config and it does work if the format of the color is like this hsl(0, 100%, 50%), but some components library likes to use hsl variables like ShadCN (--foreground: 222.2 47.4% 11.2%;) is there a way to support this kind of format ?

this is my current config

require("colorizer").setup({ "*" }, {
			RGB = true, -- #RGB hex codes
			RRGGBB = true, -- #RRGGBB hex codes
			names = true, -- "Name" codes like Blue or blue
			RRGGBBAA = true, -- #RRGGBBAA 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
			mode = "background", -- Set the display mode.
			lowercase = true, -- Enable lowercase color names
		})

To Reproduce
Your configuration and/or a small reproducible test, and/or the steps required to reproduce.

Expected behavior
A clear and concise description of what you expected to happen.

Screenshots
If applicable, add screenshots to help explain your problem.

Operating System:
e.g. Ubuntu 16.04

Neovim Version:
e.g. 0.4.2

Colorizer Version:
Paste the output of

find ~/.config/nvim/ -type d -name 'nvim-colorizer.lua' -exec git rev-parse HEAD \;

Additional context
Add any other context about the problem here.

@AlejandroSanchez90 AlejandroSanchez90 added the bug Something isn't working label Oct 11, 2024
Akianonymus pushed a commit to Akianonymus/nvim-colorizer.lua that referenced this issue Dec 22, 2024
* chore: refactors minimal.lua to use lazy.nvim
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