lutgen
↴lutgen generate
↴lutgen apply
↴lutgen patch
↴lutgen palette
↴lutgen palette names
↴lutgen palette all
↴
A blazingly fast interpolated LUT utility for arbitrary and popular color palettes.
Usage: lutgen
COMMAND ...
Available options:
-h
,--help
— Prints help information-V
,--version
— Prints version information
Available commands:
generate
,g
— Generate and save a Hald CLUT to disk.apply
,a
— Apply a generated or provided Hald CLUT to images.patch
,p
— Generate a patch for colors inside text files.palette
,P
— Print palette names and colors
Supported image formats:
avif
bmp
dds
exr
ff
gif
hdr
ico
jpg
jpeg
png
pnm
qoi
tga
tiff
webp
Generate and save a Hald CLUT to disk.
Usage: lutgen
generate
[-o
=PATH
] [-p
=PALETTE
] ([-L
=FACTOR
] [-l
=2-16
] [-n
=NEAREST
] [-P
] [-s
=SHAPE
] | -S
[-p
=POWER
] [-n
=NEAREST
] [-P
] [-L
=FACTOR
] [-l
=2-16
] | -G
[-m
=MEAN
] [-s
=STD_DEV
] [-i
=ITERS
] [-S
=SEED
] [-L
=FACTOR
] [-l
=2-16
] | -N
[-L
=FACTOR
] [-l
=2-16
]) --
[COLORS
]...
Available positional items:
COLORS
— Custom colors to use. Combines with a palette if provided.
Available options:
-
-o
,--output
=PATH
— Path to write output to. -
-p
,--palette
=PALETTE
— Builtin or custom palette to use.Custom palettes can be added to
$LUTGEN_DIR
or<CONFIG DIR>/lutgen
.- 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 asmy-palette
. - Linux:
-
-L
,--lum
=FACTOR
— Factor to multiply luminocity values by. Effectively weights the interpolation to prefer more colorful or more greyscale/unsaturated matches. Usually paired with--preserve
.[default: 1.0]
-
-l
,--level
=2-16
— Hald clut level to generate. A level of 16 stores a value for the entire sRGB color space.[default: 10]
-
-n
,--nearest
=NEAREST
— Number of nearest colors to consider when interpolating. 0 uses all available colors.[default: 16]
-
-P
,--preserve
— Preserve the original image's luminocity values after interpolation.[default: false]
-
-s
,--shape
=SHAPE
— Shape parameter for the default Gaussian RBF interpolation. Effectively creates more or less blending between colors in the palette, where bigger numbers equal less blending. Effect is heavily dependant on the number of nearest colors used.[default: 128.0]
-
-S
,--shepards-method
— Enable using Shepard's method (Inverse Distance RBF) for interpolation. -
-p
,--power
=POWER
— Power parameter for shepard's method.[default: 4.0]
-
-G
,--gaussian-sampling
— Enable using Gaussian sampling for interpolation (slow). -
-m
,--mean
=MEAN
— Average amount of noise to apply in each iteration.[default: 0.0]
-
-s
,--std-dev
=STD_DEV
— Standard deviation parameter for the noise applied in each iteration.[default: 20.0]
-
-i
,--iterations
=ITERS
— Number of iterations of noise to apply to each pixel.[default: 512]
-
-S
,--seed
=SEED
— Seed for noise rng.[default: 42080085]
-
-N
,--nearest-neighbor
— Disable interpolation completely. -
-h
,--help
— Prints help information
Apply a generated or provided Hald CLUT to images.
Usage: lutgen
apply
[-d
] [-o
=PATH
] [-p
=PALETTE
] [-c
] (--hald-clut
=FILE
| [-L
=FACTOR
] [-l
=2-16
] [-n
=NEAREST
] [-P
] [-s
=SHAPE
] | -S
[-p
=POWER
] [-n
=NEAREST
] [-P
] [-L
=FACTOR
] [-l
=2-16
] | -G
[-m
=MEAN
] [-s
=STD_DEV
] [-i
=ITERS
] [-S
=SEED
] [-L
=FACTOR
] [-l
=2-16
] | -N
[-L
=FACTOR
] [-l
=2-16
]) IMAGES
... --
[COLORS
]...
Available positional items:
IMAGES
— Images to correct, using the generated or provided hald clut.COLORS
— Custom colors to use. Combines with a palette if provided.
Available options:
-
-d
,--dir
— Always save to a directory when there is only one input file. (matches output behavior for multiple files) -
-o
,--output
=PATH
— Path to write output to. -
-p
,--palette
=PALETTE
— Builtin or custom palette to use.Custom palettes can be added to
$LUTGEN_DIR
or<CONFIG DIR>/lutgen
.- 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 asmy-palette
. - Linux:
-
-c
,--cache
— Cache generated LUT. No effect when using an external LUT. -
--hald-clut
=FILE
— External Hald CLUT to use instead of generating one. -
-L
,--lum
=FACTOR
— Factor to multiply luminocity values by. Effectively weights the interpolation to prefer more colorful or more greyscale/unsaturated matches. Usually paired with--preserve
.[default: 1.0]
-
-l
,--level
=2-16
— Hald clut level to generate. A level of 16 stores a value for the entire sRGB color space.[default: 10]
-
-n
,--nearest
=NEAREST
— Number of nearest colors to consider when interpolating. 0 uses all available colors.[default: 16]
-
-P
,--preserve
— Preserve the original image's luminocity values after interpolation.[default: false]
-
-s
,--shape
=SHAPE
— Shape parameter for the default Gaussian RBF interpolation. Effectively creates more or less blending between colors in the palette, where bigger numbers equal less blending. Effect is heavily dependant on the number of nearest colors used.[default: 128.0]
-
-S
,--shepards-method
— Enable using Shepard's method (Inverse Distance RBF) for interpolation. -
-p
,--power
=POWER
— Power parameter for shepard's method.[default: 4.0]
-
-G
,--gaussian-sampling
— Enable using Gaussian sampling for interpolation (slow). -
-m
,--mean
=MEAN
— Average amount of noise to apply in each iteration.[default: 0.0]
-
-s
,--std-dev
=STD_DEV
— Standard deviation parameter for the noise applied in each iteration.[default: 20.0]
-
-i
,--iterations
=ITERS
— Number of iterations of noise to apply to each pixel.[default: 512]
-
-S
,--seed
=SEED
— Seed for noise rng.[default: 42080085]
-
-N
,--nearest-neighbor
— Disable interpolation completely. -
-h
,--help
— Prints help information
Generate a patch for colors inside text files.
Usage: lutgen
patch
[-w
] [-n
] [-p
=PALETTE
] (--hald-clut
=FILE
| [-L
=FACTOR
] [-l
=2-16
] [-n
=NEAREST
] [-P
] [-s
=SHAPE
] | -S
[-p
=POWER
] [-n
=NEAREST
] [-P
] [-L
=FACTOR
] [-l
=2-16
] | -G
[-m
=MEAN
] [-s
=STD_DEV
] [-i
=ITERS
] [-S
=SEED
] [-L
=FACTOR
] [-l
=2-16
] | -N
[-L
=FACTOR
] [-l
=2-16
]) FILES
... --
[COLORS
]...
Available positional items:
FILES
— Text files to generate patches for.COLORS
— Custom colors to use. Combines with a palette if provided.
Available options:
-
-w
,--write
— Write changes directly to the files. -
-n
,--no-patch
— Disable computing and printing the patch. Usually paired with --write. -
-p
,--palette
=PALETTE
— Builtin or custom palette to use.Custom palettes can be added to
$LUTGEN_DIR
or<CONFIG DIR>/lutgen
.- 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 asmy-palette
. - Linux:
-
--hald-clut
=FILE
— External Hald CLUT to use instead of generating one. -
-L
,--lum
=FACTOR
— Factor to multiply luminocity values by. Effectively weights the interpolation to prefer more colorful or more greyscale/unsaturated matches. Usually paired with--preserve
.[default: 1.0]
-
-l
,--level
=2-16
— Hald clut level to generate. A level of 16 stores a value for the entire sRGB color space.[default: 10]
-
-n
,--nearest
=NEAREST
— Number of nearest colors to consider when interpolating. 0 uses all available colors.[default: 16]
-
-P
,--preserve
— Preserve the original image's luminocity values after interpolation.[default: false]
-
-s
,--shape
=SHAPE
— Shape parameter for the default Gaussian RBF interpolation. Effectively creates more or less blending between colors in the palette, where bigger numbers equal less blending. Effect is heavily dependant on the number of nearest colors used.[default: 128.0]
-
-S
,--shepards-method
— Enable using Shepard's method (Inverse Distance RBF) for interpolation. -
-p
,--power
=POWER
— Power parameter for shepard's method.[default: 4.0]
-
-G
,--gaussian-sampling
— Enable using Gaussian sampling for interpolation (slow). -
-m
,--mean
=MEAN
— Average amount of noise to apply in each iteration.[default: 0.0]
-
-s
,--std-dev
=STD_DEV
— Standard deviation parameter for the noise applied in each iteration.[default: 20.0]
-
-i
,--iterations
=ITERS
— Number of iterations of noise to apply to each pixel.[default: 512]
-
-S
,--seed
=SEED
— Seed for noise rng.[default: 42080085]
-
-N
,--nearest-neighbor
— Disable interpolation completely. -
-h
,--help
— Prints help information
Print palette names and colors
Usage: lutgen
palette
(COMMAND ...
| PALETTE
...)
Examples:
$ lutgen palette all
$ lutgen palette names | grep gruvbox
$ lutgen palette oxocarbon-dark oxocarbon-light
$ lutgen palette carburetor > palette.txt
Available positional items:
-
PALETTE
— Builtin or custom palette to use.Custom palettes can be added to
$LUTGEN_DIR
or<CONFIG DIR>/lutgen
.- 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 asmy-palette
. - Linux:
Available options:
-h
,--help
— Prints help information
Available commands:
names
— Print all palette names. Useful for scripting and searching.all
— Print all palette names and colors.
Print all palette names. Useful for scripting and searching.
Usage: lutgen
palette
names
Available options:
-h
,--help
— Prints help information
Print all palette names and colors.
Usage: lutgen
palette
all
Available options:
-h
,--help
— Prints help information