catppuccin / palette

🎨 Soothing pastel theme to use within your projects!
https://www.npmjs.com/package/@catppuccin/palette
MIT License
433 stars 37 forks source link

feat: lookup tables (hald-clut) #50

Closed ozwaldorf closed 1 year ago

ozwaldorf commented 1 year ago

What

Adds pregenerated hald-clut lookup tables and a script to regenerate them as needed.

Includes 4 noise variants and the (unofficial) oled flavor.

Example

image

backwardspy commented 1 year ago

blocking this pending #49 as the work there will impact how we include LUTs.

Gingeh commented 1 year ago

I don't think we should be using a rust script for this. It's a glorified shell script that unnecessarily builds palette images identical to those already in this repository and then calls a shell command.

backwardspy commented 1 year ago

I don't think we should be using a rust script for this. It's a glorified shell script that unnecessarily builds palette images identical to those already in this repository and then calls a shell command.

winston mentioned the possibility of generating LUTs (along with everything else in the repo) with node via imagemagick-wasm.

ozwaldorf commented 1 year ago

Rebased onto #49 and replaced stuff with nodejs. Png is reused

Still requires imagemagick to be installed on the system, but I'll tinker a bit with magick-wasm

Once 49 is merged I'll rebase again, but open for review in the meantime

ozwaldorf commented 1 year ago

Update: I don't think it's a good idea to use magick-wasm. Wasm is limited to single thread execution and the library doesn't handle parallelism for MagickImageCollection evaluations, so it's extremely slow compared to the multithreaded binary. We need to duplicate the wasm instance 512 times and actually run multiple parallel operations on all of the instances to generate the LUT in any short amount of time

ozwaldorf commented 1 year ago

Closing due to inactivity, as well as both imagemagick/wasm not being ideal for this task. Also, other tools like lutgen are doing it better and faster now