rktjmp / lush.nvim

Create Neovim themes with real-time feedback, export anywhere.
MIT License
1.39k stars 46 forks source link

HSV support ? #125

Open oredaze opened 1 year ago

oredaze commented 1 year ago

I have never used HSL[uv] before and I have been ricing linux with hex colors and color pickers using HSV for years. Just installed lush.nvim and tried to convert one of my colorschemes. I am having a hard time. I could use hex colors, but I want to use the functionality of <C-a> <C-x> to perfect my old theme, so that is pointless. My color picker of choice doesn't even have HSL. EDIT: I tried GIMP - HSV there too...

I don't know if this is a reasonable feature request. If not, then I'll try switching tools and learning the new method.

rktjmp commented 1 year ago

Not against adding it, but it's not something I'm personally interested in doing the work for.

You'd have to find a licence-able HSV lua lib and write the appropriate HSV operations to mirror the API in hls_like.lua and probably scatter some logic around to detect which type of color is being operated on to integrate it (off the cuff, probably just a _type = "hsl"|"hsv" field in the table and some checks against it.), and the appropriate tests.

Most of the operations are probably not that complicated to mirror, probably only lighten/darken and mix is functionally different.

If its something you want to take on, open a PR early and we can give it some better consideration and work through it.

oredaze commented 1 year ago

I'm starting to figure it out. It doesn't look as difficult to get used to as I though. You can put it in the back-burner or close the issue. Your choice.