github InioX/matugen v4.0.0

latest release: v4.1.0
3 months ago

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

Don't miss a new matugen release

NewReleases is sending notifications on new releases.