colorscheme-transformer

Crates.iocolorscheme-transformer
lib.rscolorscheme-transformer
version0.1.2
created_at2025-07-23 19:18:01.588327+00
updated_at2025-09-03 19:17:12.658609+00
description A tool for manipulating colorschemes
homepage
repositoryhttps://github.com/WASDetchan/colorscheme-transformer/
max_upload_size
id1765164
size173,277
(WASDetchan)

documentation

README

Colorscheme transformer

  • Fill templates with colorsets
  • Make templates from colorschemes
  • Transform colorschemes to different colorsets

How to use

Installation

cargo install colorscheme-transformer

Format

Colorset is YAML file in format:
NAME: RRGGBB
RRGGBB case is ignored.
Colorscheme is a program-specific ready-to-use file.
Template is a colorscheme where some colors RRGGBB changed to their name {NAME} to be filled with a colorset.

Make template

coroscheme-transformer make [colorscheme] [colorset]

Makes template from colorscheme and colorset. For each color RRGGBB with name NAME in colorset changes every RRGGBB occurence in colorscheme to {NAME} and prints to stdout. Ingores RRGGBB case.

Fill template

coroscheme-transformer fill [template] [colorset]

Substitutes {NAME}s in template to their corresponding colors from colorsets and prints to stdout. Case-sensitive, NAMEs not present in colorset are ignored.

Transform colorscheme

coroscheme-transformer transform [colorscheme] [colorset_from] [colorset_to]

Same as first making template with the first colorset and then filling it with the second colorset.

Example

In project's root directory:

touch example/kitty-gray.conf
cat example/kitty.conf | colorscheme-transformer transform example/catppuccin-frappe.yaml example/catppuccin-frappe-gray.yaml > example/kitty-gray.conf

Or (equivalent)

coroscheme-transformer transform example/catppuccin-frappe.yaml example/catppuccin-frappe-gray.yaml --input=example/kitty.conf -o example/kitty-gray.conf

example/kitty.conf - catppuccin-frappe colorscheme for kitty
example/catppuccin-frappe.yaml - catppuccin-frappe colorset
example/catppuccin-frappe-gray.yaml - colorset based on catppuccin-frappe with gray backgrounds
produces
example/kitty-gray.conf - catppuccin-frappe colorscheme for kitty with gray backgrounds
Normal/Gray:
Result

Commit count: 15

cargo fmt