A functional and high contrast colorscheme inspired by IBM Carbon.
The current form of this scheme is as a direct patch for catppuccin ports.
Add carburetor flake to your inputs:
inputs = {
carburetor.url = "github:ozwaldorf/carburetor";
}
Add the overlay to your nixpkgs to insert the theme's package set:
pkgs = import nixpkgs {
inherit system;
overlays = [ inputs.carburetor.overlays.default ];
};
This provides the following raw theme packages:
pkgs.carburetor.base16
- whiskers base16 configpkgs.carburetor.gtk
- patched gtk themepkgs.carburetor.hyprland
- whiskers hyprland themespkgs.carburetor.hyprlock
- patched hyprlock configpkgs.carburetor.discord
- patched discord csspkgs.carburetor.papirus-folders
- patched papirus folderspkgs.carburetor.zed
- whiskers zed theme
And the following tools:
pkgs.carburetor.tools.patch
- src/patch.shpkgs.carburetor.tools.mkWhiskersDerivation
- Create a derivation from a source's whiskers template and output the files
Note: The theme's nixpkgs overlay MUST be used for the home manager modules to work.
Example home configuration:
# import the carburetor module
imports = [ inputs.carburetor.homeManagerModules.default ];
# configure carburetor theme installation
carburetor = {
config = {
variant = "regular";
accent = "blue";
};
themes = {
gtk = {
enable = true;
transparency = true;
icon = true;
# size = "compact";
# tweaks = "float";
# gnomeShellTheme = true;
};
hyprland.enable = true;
hyprlock.enable = true;
webcord = {
enable = true;
transparency = true;
};
wezterm.enable = true;
zed.enable = true;
};
};
Detailed documentation on options is available at docs/home.md.
A complete standalone home configuration example can be found in the main flake.nix, under homeConfigurations.example
.
Carburetor's nix flake can be used as a library to implement an overlay and home module for a custom catppuccin based theme, based on a color override file for whiskers. Usage is exactly the same as above, but tailored to the themes name and custom variants. Anywhere carburetor
is referenced, your-theme
will be used instead.
These custom themes can be defined and used directly in a nixos/home manager derivation, or used in a popular colorscheme's flake to provide theming for nix users:
{
description = "Example theme flake";
inputs.carburetor.url = "github:ozwaldorf/carburetor";
outputs = { self, carburetor }:
let
# Configuration for the custom theme
exampleTheme = {
# Theme name used in all packages and configuration options.
name = "example-theme";
# Variant names to replace with
variantNames = {
mocha = "darker";
macchiato = "dark";
frappe = "medium";
latte = "light";
};
# Default accent to select in configuration options
defaultAccent = "pink";
# Path to a whiskers color override file for the theme
whiskersJson = ./path/to/whiskers.json;
};
# Create an overlay for the theme packages
exampleThemeOverlay = carburetor.lib.mkCustomThemeOverlay exampleTheme;
# Create a home manager module for configuring the themes
exampleThemeHomeModule = carburetor.lib.mkCustomHomeManagerModule exampleTheme;
in
{
# Output the overlay and module for flake consumers
overlays.default = exampleThemeOverlay;
homeManagerModules.default = exampleThemeHomeModule;
};
};
There is a simple bash script for patching any existing catppuccin port's hex colors to carburetor. Note that some ports use a css pre-processor to create variations of colors, so they will need to be patched beforehand and then compiled, like discord.
./patch.sh <FLAVOR> <TRANSPARENCY> <directory path>
Options:
FLAVOR: all | mocha | macchiato | frappe
TRANSPARENCY: true | false
To patch the discord catppuccin port, run the following:
# Clone the port
git clone https://github.com/catppuccin/discord && cd discord
# Install dependencies
yarn install
# Patch each flavor
../src/patch.sh all false node_modules/@catppuccin/palette
# Build the port
yarn build
# Install a theme (webcord specific, for other projects check their docs)
# cp dist/dist/catppuccin-mocha.theme.css ~/.config/WebCord/Themes/carburator
# cp dist/dist/catppuccin-macchiato.theme.css ~/.config/WebCord/Themes/carburator-cool
# cp dist/dist/catppuccin-frappe.theme.css ~/.config/WebCord/Themes/carburator-warm
Catppuccin has a tool called whiskers which is used to create color schemes from template files. The whiskers.json
file can be used to generate a Carburetor color scheme for any template file that works with whiskers
.
A list of available catppuccin ports can be found at arewewhiskersyet.com.
The same process should apply for whichever program you would like to create a Carburetor color scheme for.
- Install whiskers
- Download the template file for Zed
- (Optional) customize the template file as you like (e.g. changing the names of color schemes, etc.). Documentation for the template syntax
whiskers
uses is available here. - Run (customizing the input filename and output format for your template):
whiskers --color-overrides whiskers.json zed.tera
whiskers
should generate one or more color scheme files, dependent on the template. For Zed, it generates athemes
directory with color scheme files for each accent color.- Install your color scheme!
catppuccin.nvim can be easily configured to use carburetor colors, shown here.
Catppuccin userstyle ports use the same exact color definitions, and can be easily patched by replacing them with the userstyle colors.
The wezterm color configs can be found here and can be copied into ~/.config/wezterm/colors/
.
You will then have the set of colorschemes available:
Carburetor
Carburetor Cool
Carburetor Warm
A set of foot terminal configs can be found at src/foot.
A set of base16 configuration files for carburetor can be found at src/base16
Heavily inspired from oxocarbon.
# update theme sources
nix-update -F --build --commit --version=branch <package>
# generate docs
nix build .\#docs && cp -L result/* docs
# generate patch tool
whiskers --dry-run --color-overrides ./whiskers.json patch.tera > src/patch.sh