Description
Matugen is a cross-platform tool that generates a colorscheme either from an image or a color, and exports it to a file from a template. It can also set the wallpaper if one was provided.
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.
Other projects
Supported platforms
- Windows
- Linux
- MacOS
Warning Matugen only supports setting the wallpaper and restarting apps on Linux for now.
Roadmap
- Add GTK4 UI
- Add a light/dark option for each template
- Improve error handling when using hex color for generating colorscheme
- Support more color formats for generating colorscheme
- Rgba
- Rgb
- Hsl
- Suport changing the wallpaper on different platforms
- MacOS
- Windows
- Support changing the wallpaper on X11
- Feh
- Nitrogen
Note Want a feature that is not listed above? Simply open an issue.
Installation
Cargo
cargo install matugen
NixOS
Add matugen to your flake inputs:
inputs = {
matugen = {
url = "github:/InioX/Matugen";
};
# ...
};
Then you can add it to your packages:
let
system = "x86_64-linux";
in {
environment.systemPackages = with pkgs; [
# ...
inputs.matugen.packages.${system}.default
];
}
Usage
Help
Verbose mode
Generate from an image
# Dark theme
# Light theme
Example:
Generate 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}).
Keywords
@@}; /* 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:
Note If no image was provided, Matugen will just skip over the image keyword
Example of all the color keywords:
/*colors.css*/
@@};
@@};
@@};
@@};
@@};
@@};
@@};
@@};
@@};
@@};
@@};
@@};
@@};
@@};
@@};
@@};
@@};
@@};
@@};
@@};
@@};
@@};
@@};
@@};
@@};
@@};
@@};
Configuration
Here is a list of different locations for the configuration file:
- 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
# config_directory/config.toml
[]
= true
= true
= 'Swww'
= '@'
= true
= [
"--transition-type",
"center",
]
= [
[ "echo", "'hello'" ]
]
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' }