Skip to main content

No project description provided

Project description

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

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

color-scheme-utils-0.1.3.tar.gz (7.3 kB view hashes)

Uploaded Source

Built Distribution

color_scheme_utils-0.1.3-py3-none-any.whl (7.4 kB view hashes)

Uploaded Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page