lutgen-rs

Blazingly fast interpolated LUT generator and applicator for arbitrary and popular color palettes.

MIT License

Downloads
29.5K
Stars
284

Bot releases are hidden (Show)

lutgen-rs - v0.11.0 Latest Release

Published by ozwaldorf about 1 month ago

CLI & Palette Overhauls

Builtin Palettes

If possible, please verify any palettes you use!

  • Palettes are now scraped from a few new sources with (theoretically) more accuracy. All palettes are deduplicated with -base16 -terminal-sexy and -gogh suffixes removed.
  • Added Swamp & Swamp-Light by @masroof-maindak in https://github.com/ozwaldorf/lutgen-rs/pull/23

CLI

Custom Palette Support

Custom palettes can be added to $LUTGEN_DIR or <CONFIG DIR>/lutgen, for example:

  • Linux: /home/alice/.config/lutgen
  • macOS: /Users/Alice/Library/Application Support/lutgen
  • Windows: C:\Users\Alice\AppData\Roaming\lutgen

Names are case-insensitive and parsed from the file stem, minus any file extensions. For example, ~/.config/lutgen/My-palette.txt would be avalable to use as my-palette.

Custom palettes work anywhere a builtin palette would, ie lutgen apply -p my-palette

Migrated from clap -> bpaf

  • explicit separation between different algorithms adjacent arguments (ie, --gaussian-sampling --mean 0 --std-dev 20 --iters 128)
  • flag aliases everywhere, due to context aware parsing of algorithm args preventing conflicts
  • subcommand aliases (ie apply/a, generate/g, patch/p)
  • Improved dynamic completions for files, palettes, and args
  • Improved helptexts and added man page (man 1 lutgen)

Other Changes

  • single file default output behavior restored (ie myimage-gruvbox.png). This now has a optional flag -d which can restore enabling directory output mode for single files (ie gruvbox/myimage.png)
  • Improved lut caching eliminates false hits and ensures cache paths are unique to the individual colors (ie luts cached via lutgen apply -c ...)
  • Palettes can be extended with custom colors by using them simultaneously
  • Guess image types by @drainpixie in https://github.com/ozwaldorf/lutgen-rs/pull/21

New Contributors

Special thanks

Thanks to @pacak for all the help in resolving the edge cases in bpaf ❤️

Full Changelog: https://github.com/ozwaldorf/lutgen-rs/compare/v0.10.1...v0.11.0

lutgen-rs - v0.10.1

Published by ozwaldorf 5 months ago

Library

CLI

  • feat: patch subcommand for text files, supporting #ABCDEF, rgb(4, 2, 0), and rgba(0, 1, 2, 0.5)
  • feat: support 3 color hex codes in cli args (ie, #000)
  • refactor: all spinners now print in stderr (to allow patch command's output to be easily piped from stdout)
  • fix: output path logic

New Contributors

Full Changelog: https://github.com/ozwaldorf/lutgen-rs/compare/v0.10.0...v0.10.1

lutgen-rs - 0.10.0

Published by ozwaldorf 7 months ago

CLI (breaking change)

  • All default outputs for single files will now match the behavior of multi file operations. The output path will be stored in a directory named by the palette, unless otherwise specified.
  • The default shape parameter for GaussianRBF, the default interpolation algorithm, is now 128

Library

  • Simple benchmarks
  • Performance: refactor for kiddo v4
  • Performance: optimize identity::generate
  • Performance: enable fat lto, allow loop vectorization during build

Palettes

New Contributors

Full Changelog: https://github.com/ozwaldorf/lutgen-rs/compare/v0.9.0...v0.10.0

lutgen-rs - v0.9.0

Published by ozwaldorf about 1 year ago

Library

  • Internal refactors, moved typed rbf algorithms into a macro implementation (yay meta programming!).

CLI

  • Added --preserve flag for all rbf algorithms, which will preserve the original images luminocity values, after interpolation.
    • This allows for combining --lum 0 --preserve to ignore all luminocity when interpolating, and to use the original images luminocity instead, for some really nice results.

Palettes

New Contributors


Full Changelog: https://github.com/ozwaldorf/lutgen-rs/compare/v0.8.3...v0.9.0

lutgen-rs - v0.8.3

Published by ozwaldorf about 1 year ago

  • fix interpolation (should expect squared distance)

Full Changelog: https://github.com/ozwaldorf/lutgen-rs/compare/v0.8.2...v0.8.3

lutgen-rs - v0.8.2

Published by ozwaldorf about 1 year ago

Fixes rbf interpolation functions

Full Changelog: https://github.com/ozwaldorf/lutgen-rs/compare/v0.8.1...v0.8.2

lutgen-rs - v0.8.1

Published by ozwaldorf about 1 year ago

What's Changed

New Contributors

Full Changelog: https://github.com/ozwaldorf/lutgen-rs/compare/v0.8.0...v0.8.1

lutgen-rs - v0.8.0 - CLI Overhaul!

Published by ozwaldorf over 1 year ago

What's Changed

Functionality in the cli has been moved entirely within subcommands now:

  • generate: generate a hald clut for external use
  • apply: generate or use a hald clut, and apply it to an image
  • completions: generates shell completions

This fixes issues where the completion scripts parse the subcommand as a custom color, and suggests to type the subcommand twice.

Custom colors also now need to be separated with a -- at the end of the command


Full Changelog: https://github.com/ozwaldorf/lutgen-rs/compare/v0.7.0...v0.8.0

lutgen-rs - v0.7.0

Published by ozwaldorf over 1 year ago

What's Changed

  • feat: luminosity factor for all algorithms (--lum <factor>)
  • feat: generate completions for bash, zsh, fish, powershell, and elvish (--completions <shell>)
  • refactor: Gaussian Sampling now uses Oklab colorspace
  • refactor: exoquant dependency is fully removed

Full Changelog: https://github.com/ozwaldorf/lutgen-rs/compare/v0.6.2...v0.7.0

lutgen-rs - v0.6.2

Published by ozwaldorf over 1 year ago

What's Changed

New Contributors


Full Changelog: https://github.com/ozwaldorf/lutgen-rs/compare/v0.6.1...v0.6.2

lutgen-rs - v0.6.1

Published by ozwaldorf over 1 year ago

What's Changed

  • Quickfix: Argument conflict from shape and std. dev.
  • AUR Release: lutgen-bin
lutgen-rs - v0.6.0 - Oklab!

Published by ozwaldorf over 1 year ago

What's Changed

RBF Based algorithms now operate within the Oklab colorspace.

This is a much better perceptual colorspace that is really good for gradients between colors, and produces very consistent results in terms of luminosity and other perceptual factors.

Breaking Changes

  • RBFRemapper and it's associated algorithm types no longer accept a generic exoquant colorspace
  • CLI argument euclide was renamed to shape for GaussianRBF

Full Changelog: https://github.com/ozwaldorf/lutgen-rs/compare/v0.5.0...v0.6.0

lutgen-rs - v0.5.0

Published by ozwaldorf over 1 year ago

New additions:

  • New RBF interpolation algorithms
    • Shepard's method (inverse distance weighting)
    • Gaussian RBF
    • Linear (1/distance) RBF

Breaking changes:

  • interpolated_remap module is renamed to interpolation
  • lutgen::generate_lut<A> generic function has been moved into the new GenerateLut trait
  • InterpolatedRemapper trait no longer contains a new constructor or associated type Params; each implementation provides their own new function
  • GaussianV0 struct has been removed, the V1 implementation produces identical results now
  • GaussianV1 struct has been renamed to GaussianSampling

Full Changelog: https://github.com/ozwaldorf/lutgen-rs/compare/v0.4.3...v0.5.0

lutgen-rs - v0.4.3

Published by ozwaldorf over 1 year ago

  • unified dracula palette
  • release builds compile with opt level z
  • update readme example images
lutgen-rs - v0.4.2

Published by ozwaldorf over 1 year ago

  • add Catppuccin OLED
  • binary will use new minor palette versions w/o needing a new release of the main crate

Full Changelog: https://github.com/ozwaldorf/lutgen-rs/compare/v0.4.1...v0.4.2

lutgen-rs - v0.4.1

Published by ozwaldorf over 1 year ago

Add lut cache for apply subcommand

Full Changelog: https://github.com/ozwaldorf/lutgen-rs/compare/v0.4.0...v0.4.1

lutgen-rs - v0.4.0

Published by ozwaldorf over 1 year ago

  • added simple color correction algorithm for applying luts
  • refactored and improved binary with new subcommand: apply <image>

Full Changelog: https://github.com/ozwaldorf/lutgen-rs/compare/v0.3.2...v0.4.0

lutgen-rs - v0.3.2

Published by ozwaldorf over 1 year ago

Fix base identity algorithm

Full Changelog: https://github.com/ozwaldorf/lutgen-rs/compare/v0.3.1...v0.3.2

lutgen-rs - v0.3.1

Published by ozwaldorf over 1 year ago

Update usage texts around the repo

Full Changelog: https://github.com/ozwaldorf/lutgen-rs/compare/v0.3.0...v0.3.1

lutgen-rs - v0.3.0

Published by ozwaldorf over 1 year ago

Refactor the library's algorithms around generic traits and some improvements to the binary

Full Changelog: https://github.com/ozwaldorf/lutgen-rs/compare/v0.2.1...v0.3.0