2025-07-13.22-21-19.mp4
A command-line utility for changing the primary accent color in your desktop rice (customized Linux desktop setup). Palettro allows you to quickly switch between different accent colors across all your configured applications with a single command.
- Quick Color Switching β‘: Change your primary accent color across your entire rice instantly
- Multi-Application Support π: Update colors in multiple config files simultaneously
- Service Management π οΈ: Automatically restart applications after color changes
- Predefined Palette π: Ships with a beautiful Catppuccin color selection
- Template System π: Uses template files to apply colors to your configurations
- Linux operating system π§
yay -S palettro-bin
# or
paru -S palettro-bin wget https://github.com/arithefirst/palettro/releases/download/v1.0.0/palettro-linux-x86_64 -O palettro
# Optional sha256sum check
echo "41cf04b6ac6418ae489e623d328b270f72c1ebf3fa0beff0aaa3585f00c18067 palettro" | sha256sum --check
chmod +x ./palettro
sudo mv palettro /usr/local/bin/git clone https://github.com/arithefirst/palettro
cd palettro
go build -o palettro
sudo mv palettro /usr/local/bin/# Apply a color theme
palettro -color blue
# Show all available colors
palettro -showcolors
# Show all configured applications
palettro -showconfigs
# Use a custom config file
palettro -config /path/to/custom/config.json -color red| Flag | Description | Default |
|---|---|---|
-color |
Color name to apply to your desktop theme | Required |
-config |
Path to configuration file | ~/.config/palettro/config.json |
-showcolors |
Display all available color names | false |
-showconfigs |
Show all registered application configs | false |
Palettro uses a JSON configuration file located at ~/.config/palettro/config.json. If this file doesn't exist, it will be created automatically with default settings.
{
"colors": {
"colorname": {
"hex": "#ffffff",
"rgb": "rgb(255, 255, 255)",
"hsl": "hsl(0deg, 0%, 100%)"
}
},
"configs": [
{
"name": "application-name",
"path": "~/.config/app/",
"restart": "application-binary"
// The "restart" option is optional. Only put the name
// of the binary if it dosen't auto-update config
// files. Waybar, for example needs to be restarted
// for config changes to take affect. Hyprland, for
// example auto-updates when changes are detected.
}
]
}Palettro ships with the following color palette:
rosewater- #f5e0dc πΈflamingo- #f2cdcd π¦©pink- #f5c2e7 πmauve- #cba6f7 π£red- #f38ba8 π΄maroon- #eba0ac π·peach- #fab387 πyellow- #f9e2af πgreen- #a6e3a1 πteal- #94e2d5 π’sky- #89dceb βοΈsapphire- #74c7ec πblue- #89b4fa π΅lavender- #b4befe πͺ»
To add support for a new application:
- Add an entry to the
configsarray in your configuration file - Run
palettro -showconfigsto verify it was properly added and create the nessecary file structure - Create template files in
~/.config/palettro/[app-name]/ - Use color variables in your templates that palettro can replace
Template Variables:
((PALETTRO.HEX))- Hexadecimal format (e.g.,89b4fa)((PALETTRO.HEXTRANS))- Hexadecimal format with transparency value (e.g.,89b4faff)((PALETTRO.RGB))- RGB format (e.g.,137, 180, 250)((PALETTRO.RGBA))- RGBA format (e.g.,242, 205, 205, 1)((PALETTRO.HSL))- HSL format (e.g.,217deg, 92%, 76%)
Example:
{
"name": "waybar",
"path": "~/.config/waybar/",
"restart": "waybar"
}When you run palettro -color blue, it reads template files from ~/.config/palettro/waybar/, replaces the color variables with blue's values, and writes the processed files to ~/.config/waybar/.
## Examples π‘
### Switching Themes
```bash
# Apply a blue theme to all configured applications
palettro -color blue
# Apply a red theme with custom config
palettro -config ~/my-themes.json -color red
# See all available colors
palettro -showcolors
# See all configured applications
palettro -showconfigsWe welcome contributions to palettro! This project is licensed under the GNU GPL 3.0.
- Fork the repository
- Clone your fork:
git clone https://github.com/arithefirst/palettro cd palettro - Create a feature branch:
git checkout -b feature/your-feature-name
- Make your changes
- Test your changes:
go test ./... go build -o palettro ./palettro -showcolors - Commit and push your changes
- Create a pull request
- Code Style: Follow standard Go formatting (
go fmt) - Documentation: Update documentation for new features
- Error Handling: Use appropriate error handling patterns
- Commit Messages: Use descriptive commit messages with the Conventional Commits standard
Please report bugs and feature requests through GitHub Issues. Include:
- Operating system and version
- Go version
- Steps to reproduce the issue
- Expected vs actual behavior
- Relevant configuration files
This project is licensed under the GNU General Public License v3.0. See the LICENSE file for details.
- Default color palette robbed from Catppuccin Mocha
- Built with Go's standard library and embedded resources