Description
A cross platform tool that generates a colorscheme either from an image or a color, and exports it to a file from a template.
About Material Design 3
Material Design 3 offers a new color system that allows for more flexible and dynamic use of color. The new system includes a wider range of colors, as well as a range of tints and shades that can be used to create subtle variations in color.
Supported platforms
- Windows
- Linux
- MacOS
Installation
cargo install matugen
NixOS
Add matugen to your flake inputs:
inputs = {
matugen = {
url = "github:/InioX/matugen-rs";
};
# ...
};
Then you can add it to your packages:
let
system = "x86_64-linux";
in {
environment.systemPackages = with pkgs; [
# ...
inputs.matugen.packages.${system}.default
];
}
Usage
From an image
# Dark theme
# Light theme
Example:
From a color
# Dark theme
# Light theme
Example:
Creating templates
The basic syntax for using colors is prefix + {color} (The default prefix is @, so the usage would be @{color}).
There are multiple formats you can use:
@@}; /* Result: #ffb783 */
@@}; /* Result: rgb(255, 183, 131) */
@@}; /* Result: rgba(255, 183, 131, 255) */
@@}; /* Result: #ffb783 */
You can also get the image (if it was provided) by using:
Example of all the colors:
/*colors.css*/
@@};
@@};
@@};
@@};
@@};
@@};
@@};
@@};
@@};
@@};
@@};
@@};
@@};
@@};
@@};
@@};
@@};
@@};
@@};
@@};
@@};
@@};
@@};
@@};
@@};
@@};
@@};
Configuration
Here is the list of the configuration file location for different platforms:
- Windows:
C:\Users\user\AppData\Roaming\InioX\matugen\config\config.toml - Linux:
/home/user/.config/matugen/config.toml - MacOS:
/Users/user/Library/Application Support/com.InioX.matugen/config.toml
Note You can also use a custom configuration path by using the
-cargument
Configuration items
[]
= true
= true
= 'Swww'
= '@'
= true
= [
"--transition-type",
"center",
]
Adding templates
# config_directory/config.toml
[] # First way of adding template
= '~/.config/example/template.css'
= '~/.config/example'
[] # Another way
= { = '~/.config/example/template2.css', = '~/.config/example2' }
Showcase
Showcase with Hyprland, Waybar, kitty, and fish shell:
Warning The preview and usage may be outdated.