MCPcopy Index your code
hub / github.com/InioX/matugen

github.com/InioX/matugen @v4.1.0

Chat with this repo
repository ↗ · DeepWiki ↗ · release v4.1.0 ↗ · + Follow
288 symbols 632 edges 42 files 4 documented · 1%
What it actually does AI analysis from the code graph — generated when you open this
loading…
README
 <img src="https://github.com/InioX/matugen/assets/81521595/66cfec75-702c-4b55-83fc-c474de171057" width=55% height=55%>





 <img src="https://github.com/InioX/matugen/assets/81521595/ec3a165d-442d-4494-9aec-24254d11ae61" width=50% height=50%>



 A cross-platform material you and base16 color generation tool


 <sub>(pronounced: mat-uh-gen)</sub>





 <img alt="license" src="https://custom-icon-badges.demolab.com/crates/l/matugen?color=3D3838&logo=law&style=for-the-badge&logoColor=370D10&labelColor=FEB3B3">
 <img alt="version" src="https://custom-icon-badges.demolab.com/crates/v/matugen?color=3D3838&logo=package&style=for-the-badge&logoColor=370D10&labelColor=FEB3B3">



 <img alt="downloads" src="https://custom-icon-badges.demolab.com/crates/d/matugen?color=3D3838&logo=download&style=for-the-badge&logoColor=370D10&labelColor=FEB3B3">
 <img alt="stars" src="https://custom-icon-badges.demolab.com/github/stars/InioX/matugen?color=3D3838&logo=star&style=for-the-badge&logoColor=370D10&labelColor=FEB3B3">



<a href="#-------------------------installation">Installation</a>
·
<a href="https://iniox.github.io/#matugen">Wiki</a>
·
<a href="#--------------------themes">Themes</a>

 <a href="https://ko-fi.com/iniox">
      <img src="https://ziadoua.github.io/m3-Markdown-Badges/badges/Ko-fi/ko-fi2.svg">
 </a>
 <a href="https://discord.gg/JA3C2U9EcC">
      <img src="https://github.com/user-attachments/assets/84f4e3a2-73ac-4112-8633-c02164c2c02c">
 </a>



 <sub>Donations through Ko-Fi are welcome!

Themes

Templates for programs and websites

Description

Features

[!TIP] If you would like to learn more about the features and configuration, read the wiki here.

  • Templating engine built with Chumsky (designed for colors) - Read More
  • Custom engine focused on making color manipulation simple and efficient
  • Import a color once in any format and automatically access all other formats (hex, rgb, rgba, hsl, etc.)
  • Colors are parsed as real color objects, not strings, making filters faster and more reliable
  • Supports piping, nested expressions, conditionals, loops, filters, includes, arithmetic operations, escaping output.
  • Can be used as a standalone templating engine. You can import custom json files or define and override them in the CLI.

  • Generate / Export Material You and base16 color palettes

  • Generate a full Material You or base16 palette from either an image or a single color
  • Export the generated palette as JSON or reference palette keywords directly within templates
  • Easily integrate palette values into config files, themes, or style templates

  • Keyword Filters - Read More

  • Modify any keyword using filters such as replace, to_upper, to_lower, and set_lightness
  • Includes built-in color filters for adjusting hue, saturation, lightness, opacity, and more
  • Filters can be chained together for powerful inline transformations

  • Custom Keywords / Colors

  • Import any JSON file (through CLI or config) and use its contents directly inside templates
  • Imported colors receive full multi-format support, just like built-in palette colors
  • Useful for adding custom theme data, config variables, or full color schemes

  • Palette Customization

  • Adjust contrast, lightness and choose the scheme type (light, dark, or custom variants)
  • Fine-tune the generated palette to match your preference or application theme

Other projects

  • Mitsugen - For gnome-shell, based on the old version of Matugen
  • pywal - More color generation backends, default theme files.
  • wpgtk - Like pywal, but with a gui and more features.

Supported platforms

  • Windows
  • Linux
  • MacOS
  • NetBSD

Installation

Cargo Cargo Version

Click to expand

cargo install matugen

Arch Arch Linux package

Click to expand

AUR:

yay -S matugen-bin

Arch extra repo

sudo pacman -S matugen

NixOS nixpkgs NixOS Version

Click to expand

Add matugen to your flake inputs:

inputs = {
  matugen = {
    url = "github:/InioX/Matugen";
    # If you need a specific version:
    ref = "refs/tags/matugen-v0.10.0";
  };
  # ...
};

Then you can add it to your packages:

let
  system = "x86_64-linux";
in {
  environment.systemPackages = with pkgs; [    
    # ...
    inputs.matugen.packages.${system}.default
  ];
}

This flake also provides a NixOS/Home Manager module, which can be imported by adding this in your configuration:

{pkgs, inputs, ...}: {
  imports = [
    inputs.matugen.nixosModules.default
  ];

  # ...
}

The module does NOT automatically symlink the files. For an example of using this module with Home Manager, see https://github.com/InioX/matugen/issues/28

Option details can be found by reading the module. A search.nixos.org-like option viewer is planned.

NetBSD pkgsrc current package

Click to expand

pkgin install matugen

or, if you prefer to build it from source

cd /usr/pkgsrc/graphics/matugen
make install

Acknowledgements


This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version.

Extension points exported contracts — how you extend this code

ExpectFromValue (Interface)
(no doc) [5 implementers]
src/parser/filters/helpers.rs
StripCanonicalization (Interface)
(no doc) [1 implementers]
src/template.rs
PaletteBackend (Interface)
(no doc) [1 implementers]
src/color/base16.rs

Core symbols most depended-on inside this repo

to_string
called by 70
src/parser/filters/filtertype.rs
to_string
called by 48
src/util/arguments.rs
insert
called by 46
src/parser/context.rs
format_color
called by 23
src/parser/engine/replace.rs
argbToHex
called by 20
compare-script.ts
rgb_from_argb
called by 15
src/color/format.rs
add
called by 14
src/parser/errors.rs
argb_from_rgb
called by 12
src/color/format.rs

Shape

Function 126
Method 107
Class 28
Enum 24
Interface 3

Languages

Rust99%
TypeScript1%

Modules by API surface

src/parser/engine.rs23 symbols
src/cache.rs20 symbols
src/parser/errors.rs19 symbols
src/color/color.rs19 symbols
src/parser/engine/replace.rs17 symbols
src/parser/context.rs17 symbols
src/color/format.rs16 symbols
src/template.rs14 symbols
src/parser/value.rs12 symbols
src/filters/colortransform.rs11 symbols
src/util/color.rs10 symbols
src/scheme.rs10 symbols

For agents

$ claude mcp add matugen \
  -- python -m otcore.mcp_server <graph>

⬇ download graph artifact