Skip to content

Releases: InioX/matugen

v4.1.0

22 Mar 08:26
4112d35

Choose a tag to compare

Added

  • add contrast config option (fixes #274)
  • add info when executing pre_hook for wallpaper
  • only show stout/stderr if not empty
  • add jxl image support (fixes #268)
  • add per template scheme types (#261)
  • add stdout and stderr for commands (fixes #227)
  • add --opacity flag (#238)
  • add error when using set_format on a color without alpha (fixes #266)
  • add alpha_hex and alpha_hex_stripped (closes #260)

Fixed

  • do not use Stdio::piped() for commands (#270)
  • canonicalize the image path (#273)
  • change description for --old-json-output
  • format new json output (#267)
  • add format into color filters category
  • update nix flake to allow building again
  • turn source_color_index comment into a doc comment
  • use comfy-table to print colors table instead of prettytable-rs
  • (base16) use image with guessed format (fixes #258)

Other

  • change nixos version badge to unstable
  • update arch installation (#269)
  • merge format_color and format_color_hsl into one
  • add website theming
  • Merge pull request #264 from zeptofine/feat/prefer-color-option

v4.0.0

13 Feb 10:21
e65259d

Choose a tag to compare

Breaking changes

Json output

The default json output has been changed. If you want to use the old one pass the --old-json-output flag

Color picker

Added a color picking prompt in the CLI. If you want to automatically select a color use --source-color-index, to mimick the old version color picking use --source-color-index 0

Cache

You may need to regenerate your cache or manually add all of the base16 colors to it.

Added base16 colors to matugen

Selecting the base16 backend

Use the --base16-backend flag

Usage in templates

{{ base16.base00.dark.hex }}
{{ base16.base00.light.hex }}

{{ base16.base0f.dark.hex }}
{{ base16.base0f.light.hex }}

Format filter

You can now format colors defined in templates. This is useful when setting the alpha value of a color. If not format filter is used, the color will be formatted as a hex string.

{{ "red" | to_color }}
{{ "red" | to_color | set_alpha: 0.5 | format: "rgba" }}
{{ "red" | to_color | set_alpha: 0.5 | format: "hsla" }}
{{ "red" | to_color | set_alpha: 0.5 | format: "hsl" }}

Hex alpha formats

These new formats are designed to output #RRGGBBAA and RRGGBBAA format, respectively. Both formats support alpha channel manipulation via the set_alpha filter.
hex_alpha and hex_alpha_stripped default to fully opaque (FF) unless modified by set_alpha.

{{ colors.surface.default.hex_alpha | set_alpha: 0.8 }}
{{ colors.surface.default.hex_alpha_stripped | set_alpha: 0.8 }}

Lightness flag

/// Value from -∞ to 1. -∞ represents minimum lightness, 0 represents
/// standard (i.e. the design as spec'd), and 1 represents maximum lightness.
/// For dark schemes, if the considered lightnesses are between 0 and 1 then this applies an affine
/// transformation to the lightness by keeping the value for 1 at 1 and setting the
/// value for 0 to the lightness argument and then clamping the result
#[arg(long, global = true, allow_negative_numbers = true)]
pub lightness_dark: Option<f64>,

/// Value from -1 to +∞. -1 represents minimum lightness, 0 represents
/// standard (i.e. the design as spec'd), and +∞ represents maximum lightness.
/// For light schemes, if the considered lightnesses are between 0 and 1 then this applies an affine
/// transformation to the lightness by keeping the value for 0 at 0 and setting the
/// value for 1 to (1 + the lightness argument) and then clamping the result
#[arg(long, global = true, allow_negative_numbers = true)]
pub lightness_light: Option<f64>,

Added

  • change default json output and add --old-json-output
  • add support for web image in base16 generation
  • add algorithm for a base16 theme from one source color
  • add format filter, add error for invalid format filter type (#248)
  • add hex alpha formats
  • [breaking] add source-color-index argument, add source color selection
  • add lightness adjustment (#153)
  • add filter documentation support and HTML output option
  • add negation support to if statements in parser (#216)
  • implement base16 color scheme support with wal backend
  • refactor color schemes and add base16 support
  • add --alternative-json-output (#230)

Fixed

  • specify license type (fixes #256)
  • remove useless warning about base16 colors not generating from a color
  • add default color to the source color selection, add instructions for navigating and selecting
  • downgrade csscolorparser to version 0.7.2 (#244)
  • swap saturation and lightness values (#241)
  • to_color filter formatting value automatically
  • change error message wiki link
  • 0.05 not being parsed properly (#232)
  • make red,green,blue be actual ints (#225)

Other

  • move themes to the top of the readme
  • add .direnv to gitignore
  • add .envrc
  • update archlinux version badge
  • shorten flat match for DynamicScheme generation
  • (readme) update features to mention base16
  • (readme) add note about generating base16 colors
  • improve error handling, fix panicking because of base16 (#246)
  • run cargo fmt
  • update wiki link under header
  • update wiki link
  • change README features and add wiki reference
  • Add Kofi button and change text position in header
  • Add Ko-fi username for funding

v3.1.0

26 Nov 19:44
5f0ecbe

Choose a tag to compare

Added

  • add pre_hook and post_hook to nixos module (#170)
  • add fallback color (#218)
  • add loop.index, loop.last, loop.first (#216)
  • add overwriting syntax per template (#213)
  • add [config.import_json_files]
  • add --continue-on-error (#209)

Fixed

  • mode first letter being uppercase (#201)
  • remove dbg! call in get_source_color
  • caching not working when it doesn't exist (#184)
  • cache not overwriting source_color (#184)
  • not using the actual mode for colors when caching is enabled (#212)
  • if not using the actual else branch when false (#212)
  • alpha value being rounded (#211)

Other

  • Merge branch 'main' into feat/output-path-array
  • improve errors
  • run cargo fmt
  • remove count for exported templates
  • improve how json is imported
  • run cargo fmt

v3.0.0

26 Oct 19:54

Choose a tag to compare

Changed templating engine

Matugen now finally uses its own custom written templating engine with using colors as the main priority. You can import colors from json as well.

Overwriting a color:

"colors": {
    "primary": {
        "light": {
          "color": "#ff0000"
        },
        "default": {
          "color": "#ff0000"
        },
        "dark": {
          "color": "#ff0000"
        }
    }
  }

Adding a custom color:

{
    "color_name": {
        "color": "#ff0000"
    }
}

Added input_path_modes

input_path_modes = { dark = "./colors.whatever-extension", light = "./colors.whatever-extension" }

Improved color generation and picking from wallpaper

#182

Removed [config.custom_keywords]

See below for a replacement

Added --import-json, --import-json-string and matugen json <file>

matugen json <file> completely skips generating the colors allowing you to use matugen as a templating engine only.

--import-json-string takes priority and overwrites the data from --import-json, you can use all of them multiple times and they will be merged together.

matugen json <json-file> --import-json <json-file> --import-json <json-file2> --import-json-string '{ "text": "Hello, World!" }'

Remove the UI

It wasn't the best and it was one more thing to add features to so it was removed.

Added caching for images

If you enable caching in your config.toml

[config]
# ...
# Enables caching which will cache the colorscheme, custom colors, etc. into a cache folder located in
# Windows: C:\Users\user\AppData\Roaming\InioX\matugen\cache\images\<file>
# Linux: $XDG_CACHE_HOME/matugen/<file> or $HOME/.cache/matugen/images/<file>
# MacOS: $HOME/Library/Caches/matugen/images/<file>
# The file follows this naming: <image_name>.<image_extension>.<image_hash>.json
# For example: testimage.png.0cfd2d624b3d09bf6246b7be9ca79e207e7aa1189d961d44949628b99811bb9d.json
# You can modify the cache and it will then be loaded when using the same image.
caching = false

Added blend. renamed old blend to harmonize

normal: {{ colors.green_source.default.hex }}
blended_full: {{ colors.green_source.default.hex | blend: {{ colors.source_color.default.hex }}, 1.0 }}
blended_half: {{ colors.green_source.default.hex | blend: {{ colors.source_color.default.hex }}, 0.5 }}
harmonized: {{ colors.green_source.default.hex | harmonize: {{ colors.source_color.default.hex }} }}

Added string casing filters

c7ce44e

3.0.0 - 2025-10-25

Added

  • allow output_path of template to be none
  • add --import-json-string
  • support multiple paths for --import-json
  • add escaping for delimiters (#190)
  • add string casing filters (#157)
  • improve color generation (#182)
  • add back set to (closes #177)
  • allow if expressions in filter args
  • add more errors for parser
  • use thiserror for parser
  • remove ui
  • show info message when executing hooks
  • add include-image-in-json (#175)
  • remove custom_keywords
  • added blend. rename old blend to harmonize
  • if path has a number, use a _ prefix
  • add all formats for to_color
  • add matugen json, change how parser resolves colors
  • add blend filter
  • add looping over color formats and impl display for maps
  • allow expressions inside of keywords
  • add binary operations (only in filter args)
  • support exprs for filter args
  • replace resolve_path_filter
  • add range expression
  • change how resolve works
  • add if statement
  • add include block
  • add auto_lightness
  • (gui) save image folder and tab
  • add input_path_modes (#142)
  • (gui) add path under images
  • (gui) add images tab
  • add ui
  • add palettes to dump_json

Fixed

  • allow escape without anything (#200)
  • do not trim source for parser (#192)
  • colors not saved correctly (#184)
  • casting as u8 for hue (#168)
  • cache not having colors in it (#184)
  • argb_from_rgb converting wrong color (#173)
  • fix minor typo in build command
  • errors in included files showing span in original
  • not overwriting generated files
  • check metadata only if file exists
  • use "choice" instead of "or" in parser
  • change template adding and fix include (#158)
  • ingoring whitespace in for loop
  • actually show the template name in errors
  • cache not loading
  • remove dbg print for path
  • trying to install color eyre twice
  • not compiling because of unix wallpaper
  • wrong tones in dump_json (#116)
  • remove wallpaper.set option
  • add dump-json to default featues

Other

  • add command.sh to example/
  • add compare-script.ts
  • add resize-filter arg (#182)
  • remove warnings
  • use wrap_err, fix read only detection
  • Update main.yml
  • Update main.yml
  • Update main.yml
  • change release-plz workflow
  • move some stuff from main into helpers
  • fix all warnings
  • add to_color (TODO)
  • remove all warnings
  • move parser into its own file
  • change cache colors to #RRGGBBAA
  • run cargo clippy fix
  • run cargo fmt
  • change cache color format
  • theme the ui based on image
  • fix raw strings in parser
  • fix ui, move cache to cache/images
  • add hooks
  • improve errors, add caching toggle
  • add caching
  • support chaning syntax
  • add hsl filters, saturate
  • run cargo clippy --fix, remove benches
  • use IndexMap instead for ordering in for loops
  • return multiple errors
  • use colorsys
  • replace engine, support quoted ident
  • use simplespan instead
  • add set_alpha
  • restructure
  • move stuff from engine
  • run clippy fix
  • remove modified_colors
  • use lazy color
  • remove matugen-parser
  • working for loops
  • kinda working for loop
  • add error for arg type
  • add expect_args
  • rename filtertype
  • cleanup imports
  • remove old filters
  • working no for loops
  • run cargo fmt
  • refactor
  • (readme) improve discord link
  • run cargo fmt
  • (readme) add discord server link

v2.4.1

13 Nov 20:58
cb9f81e

Choose a tag to compare

Fixed

  • remove wallpaper.set option
  • add dump-json to default featues

Other

  • run cargo fmt
  • (readme) add discord server link

v2.4.0

09 Nov 10:17
ab0a12f

Choose a tag to compare

Added

  • add mode keyword
  • (filter) add auto_lightness filter
  • (filter) add camel_case filter
  • custom expr and block prefix, postfix
  • feature-gated web-image
  • feature-gated dumping json
  • feature-gated update-informer
  • (filters) add invert, grayscale and set_hue`
  • add timestamp to debug logs
  • add more info to debug mode
  • add pre_hook and post_hook (#100)
  • improve error message for color parsing
  • change resize filter to Lanczos3 (#89)
  • increase windows stack size to 8mb (fixes #87)
  • fix relative paths for templates, format compare_to (#83)
  • add template formatting for hook (#83)
  • add hook and variables inside it (#83)
  • add color comparsion (#83)
  • add --prefix argument
  • add version_check setting (#78)

Fixed

  • --help flag not recognized (#112)
  • parse color bug for rgb (#107)
  • (nix) add dump-json feature build flag
  • dump_json BTreeSet index
  • apply more aggressive clippy lints
  • removed deprecated default_features
  • removed unused dependency
  • cargo fmt & alejandra (nix formatter)
  • made unix version compile
  • wrong display of alpha channel for set_alpha (#95)
  • divide all alpha values by 255 for output (#95)
  • make hooks not depend on colors_to_compare (#93)
  • remove useless debugging
  • update arguments to remove borrow error (#85)

Other

  • run cargo fmt
  • made contrast configurable in nix module
  • make nix module able to generate from color or wallpaper.
  • add backup config option to add in anything that isn't explicitly supported
  • add custom colors option to nix module.
  • format code
  • add criterion bench
  • move some stuff into template_util (prepare for criterion)
  • add schemes_eq test
  • use BTreeSet, remove ahash and IndexMap
  • move template into src/
  • Create rustfmt.yml
  • update dependencies with breaking changes
  • sorted dependencies
  • removed unused dependency features
  • made enquote only required for builds targeting macOS
  • moved scheme out of module with only 1 file
  • cargo update
  • removed dependency proper-path-tools
  • move some stuff into lib instead
  • remove useless stuff, add clippy rules
  • run cargo fmt + clippy fix
  • oops bad merge (#95)
  • Merge branch 'main' of https://github.com/InioX/matugen
  • add float parameter for format_hsla and format_rgba (#95)
  • update CHANGELOG.md
  • add the set_alpha filter to the engine
  • add format_rgba_float and format_hsla_float functions to format the alpha value as a float instead of u8
  • add set_alpha filter
  • Nix module: add package option
  • bump material-colors to 0.4.0
  • rename compared_color to closest_color (#83)
  • separate some stuff into functions
  • format code
  • run cargo fmt
  • (readme) update version badges

Added

  • add set_alpha filter

v2.3.0

30 May 21:40
b399acb

Choose a tag to compare

Added

  • rework harmonized colors into custom colors

Fixed

  • nixos flake compile error
  • update material-colors to 0.3.1 (#69)

Other

  • Merge pull request #73 from vt-d/patch-1
  • Fix issue #71
  • update material-colors to 0.3.2
  • update material-colors
  • support x86_64-linux + aarch64-linux by default
  • make supportedSystems overridable

v2.2.0

28 Mar 20:32
5662775

Choose a tag to compare

Added

  • add harmonized_colors to --json flag (#53)
  • add to_upper and to_lower filters
  • add replace filter
  • add set_lightness filter
  • add colors_to_harmonize
  • (config) change custom_keywords configuration syntax

Fixed

  • move aur publish into aur.yml
  • remove aur action in main.yml
  • format harmonized_colors in dump_json (#53)

Other

  • (readme) update features
  • (readme) add arch install guide
  • Merge pull request #58 from Ehllay/main
  • Merge pull request #57 from InioX/dev
  • remove error message when compiling template
  • run clippy fix

v2.1.0

03 Feb 17:25
f0d47fd

Choose a tag to compare

Added

  • add --contrast flag

Fixed

  • add back source_color to --show-colors
  • use IndexMap for --show-colors table

Other

  • Merge pull request #52 from InioX/dev
  • (readme) update acknowledgements
  • (readme) remove roadmap
  • bump material-colors ver

v2.0.0

01 Feb 10:11
702e912

Choose a tag to compare

Replace material-colors-utilities-rs dependency with material-colors. Which means that amoled mode, android colors and custom palettes (Default, Triadic, Adjacent) have been removed.

New custom scheme types

Added new type -t, --type <TYPE> argument that replaces the old -p, --palette <PALETTE> one.

  • Sets a custom color scheme type [default: scheme-tonal-spot]
  • List of all types:
    • scheme-content
    • scheme-expressive
    • scheme-fidelity
    • scheme-fruit-salad
    • scheme-monochrome
    • scheme-neutral
    • scheme-rainbow
    • scheme-tonal-spot

Fixed

  • Matugen not compiling on MacOS because of target specific dependencies not working for some reason

Removed

  • All Android colors
    • source_color
    • color_accent_primary
    • color_accent_primary_variant
    • color_accent_secondary
    • color_accent_secondary_variant
    • color_accent_tertiary
    • color_accent_tertiary_variant
    • text_color_primary
    • text_color_secondary
    • text_color_tertiary
    • text_color_primary_inverse
    • text_color_secondary_inverse
    • text_color_tertiary_inverse
    • color_background
    • color_background_floating
    • color_surface
    • color_surface_variant
    • color_surface_highlight
    • surface_header
    • under_surface
    • off_state
    • accent_surface
    • text_primary_on_accent
    • text_secondary_on_accent
    • volume_background
  • Amoled/pure dark mode
  • Custom palettes