Skip to main content

color-scheme-utils

A set of utilities for working with (terminal) color schemes / themes.

List of utilities

kitty-conf-extract-theme

Extract the color settings from kitty configuration / theme files, convert them to different formats so that you can copy-paste them into the settings of your favorite terminal emulator.

Supported Output Formats

Click the titles to expand to see the example output generated from kitty-theme's template.conf

JSON
{
    "foreground": "#dddddd",
    "background": "#000000",
    "selection_foreground": "#000000",
    "selection_background": "#fffacd",
    "cursor": "#cccccc",
    "cursor_text_color": "#111111",
    "url_color": "#0087bd",
    "active_border_color": "#00ff00",
    "inactive_border_color": "#cccccc",
    "bell_border_color": "#ff5a00",
    "active_tab_foreground": "#000",
    "active_tab_background": "#eee",
    "inactive_tab_foreground": "#444",
    "inactive_tab_background": "#999",
    "mark1_background": "#98d3cb",
    "mark2_background": "#f2dcd3",
    "mark3_background": "#f274bc",
    "black": "#000000",
    "bright_black": "#767676",
    "red": "#cc0403",
    "bright_red": "#f2201f",
    "green": "#19cb00",
    "bright_green": "#23fd00",
    "yellow": "#cecb00",
    "bright_yellow": "#fffd00",
    "blue": "#0d73cc",
    "bright_blue": "#1a8fff",
    "magenta": "#cb1ed1",
    "bright_magenta": "#fd28ff",
    "cyan": "#0dcdcd",
    "bright_cyan": "#14ffff",
    "white": "#dddddd",
    "bright_white": "#ffffff"
}
VS Code
{
    "workbench.colorCustomizations": {
        "panel.background": "#000000",
        "terminalCursor.foreground": "#cccccc",
        "terminalCursor.background": "#111111",
        "terminal.ansiBlack": "#000000",
        "terminal.ansiBrightBlack": "#767676",
        "terminal.ansiRed": "#cc0403",
        "terminal.ansiBrightRed": "#f2201f",
        "terminal.ansiGreen": "#19cb00",
        "terminal.ansiBrightGreen": "#23fd00",
        "terminal.ansiYellow": "#cecb00",
        "terminal.ansiBrightYellow": "#fffd00",
        "terminal.ansiBlue": "#0d73cc",
        "terminal.ansiBrightBlue": "#1a8fff",
        "terminal.ansiMagenta": "#cb1ed1",
        "terminal.ansiBrightMagenta": "#fd28ff",
        "terminal.ansiCyan": "#0dcdcd",
        "terminal.ansiBrightCyan": "#14ffff",
        "terminal.ansiWhite": "#dddddd",
        "terminal.ansiBrightWhite": "#ffffff"
    }
}
Windows Terminal
{
    "name": "kitty",
    "foreground": "#dddddd",
    "background": "#000000",
    "selectionForeground": "#000000",
    "selectionBackground": "#fffacd",
    "cursorColor": "#cccccc",
    "black": "#000000",
    "brightBlack": "#767676",
    "red": "#cc0403",
    "brightRed": "#f2201f",
    "green": "#19cb00",
    "brightGreen": "#23fd00",
    "yellow": "#cecb00",
    "brightYellow": "#fffd00",
    "blue": "#0d73cc",
    "brightBlue": "#1a8fff",
    "purple": "#cb1ed1",
    "brightPurple": "#fd28ff",
    "cyan": "#0dcdcd",
    "brightCyan": "#14ffff",
    "white": "#dddddd",
    "brightWhite": "#ffffff"
}
kitty
foreground                     #dddddd
background                     #000000
selection_foreground           #000000
selection_background           #fffacd
cursor                         #cccccc
cursor_text_color              #111111
url_color                      #0087bd
active_border_color            #00ff00
inactive_border_color          #cccccc
bell_border_color              #ff5a00
active_tab_foreground          #000
active_tab_background          #eee
inactive_tab_foreground        #444
inactive_tab_background        #999
mark1_background               #98d3cb
mark2_background               #f2dcd3
mark3_background               #f274bc
black                          #000000
bright_black                   #767676
red                            #cc0403
bright_red                     #f2201f
green                          #19cb00
bright_green                   #23fd00
yellow                         #cecb00
bright_yellow                  #fffd00
blue                           #0d73cc
bright_blue                    #1a8fff
magenta                        #cb1ed1
bright_magenta                 #fd28ff
cyan                           #0dcdcd
bright_cyan                    #14ffff
white                          #dddddd
bright_white                   #ffffff

Usage

$ kitty-conf-extract-theme -h

usage: kitty-conf-extract-theme [-h] [-V] [-c KITTY_CONF_FILE] [-f {windowsterminal,vscode,kitty,json}] [-s]

Extract the color scheme from a kitty theme / conf file

options:
  -h, --help            show this help message and exit
  -V, --version         show program's version number and exit
  -c KITTY_CONF_FILE, --kitty-conf-file KITTY_CONF_FILE, --kitty-theme-file KITTY_CONF_FILE
                        Kitty conf theme file (default: /Users/tscp/testdir/kitty-themes/template.conf)
  -f {windowsterminal,vscode,kitty,json}, --output-format {windowsterminal,vscode,kitty,json}
                        Output format (default: json)
  -s, --sort-keys       Sort color name keys (default: False)

Installation

pipx

This is the recommended installation method.

$ pipx install color-scheme-utils

pip

$ pip install color-scheme-utils

Thanks

Metadata

Release files for color-scheme-utils 0.1.3

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for color-scheme-utils 0.1.3
File Size Uploaded
color-scheme-utils-0.1.3.tar.gz 7.3 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for color-scheme-utils 0.1.3
File Interpreter ABI Platform
color_scheme_utils-0.1.3-py3-none-any.whl Python 3 none any Details

Total release size: 14.7 kB

Release files / color-scheme-utils-0.1.3.tar.gz

Download URL color-scheme-utils-0.1.3.tar.gz
Size 7.3 kB
Tags Source
SHA-256 checksum
How to use checksums
894a2ddfed0cc44648efaeab7ab00fc6e2c0624928740230532e8e018e2db87d
BLAKE2b-256 checksum
How to use checksums
b3358f2e0064f4ba5bcd5549849011eed0ad6388c59237ce9c16b6daae929e31
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via poetry/1.2.0b2 CPython/3.10.4 Darwin/21.6.0

Release files / color_scheme_utils-0.1.3-py3-none-any.whl

Download URL color_scheme_utils-0.1.3-py3-none-any.whl
Size 7.4 kB
Tags Python 3
SHA-256 checksum
How to use checksums
60baf482d02ab845a43694dda2c18af881d6e3bf2310f72dbe994650e65e38c4
BLAKE2b-256 checksum
How to use checksums
26ddc966fb872b1f25d798d9bcdff335fc10b40e58c194806752f705dae46ef3
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via poetry/1.2.0b2 CPython/3.10.4 Darwin/21.6.0

Release history Release notifications | RSS feed

This release

0.1.3 This release

2 release files

0.1.2

2 release files

0.1.1

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page