Helper programs to create templates and schemes
Helper programs to create templates and schemes.
Lib file used by iterm2base24.py and windowsTerminal2b24.py with the following
function:
def process(base24, base24lookup, sourceThemeDict, bgNumber, fgNumber):
"""process a base24 dict using a lookup table to translate the source theme
onto the base24 scheme
Args:
base24 (dict): a dictionary representing a base24 scheme
base24lookup (dict): a dictionary mapping base24 colour ids to the
respective key in the sourceThemeDict
sourceThemeDict (dict): a dictionary representing the source theme/
scheme
bgNumber (int): lower base0N bound for the background 0-9
fgNumber (int): upper base0N bound for the foreground 0-9. Must be
greater than bgNumber
Returns:
dict: base24 dict to write to scheme file
"""
Compare base16 and base24 Windows terminal themes quickly
usage: baseCompare.py [-h] [--all] themes
Compare base16 and base24 windows terminal themes quickly
positional arguments:
themes directory containing generated windows terminal themes
optional arguments:
-h, --help show this help message and exit
--all compare all schemes
Convert a directory containing .itermcolors to base24 schemes
usage: batchIterm2b24.py [-h] itermschemes
Convert .itermcolors to base24 scheme in a directory
positional arguments:
itermschemes directory containing itermschemes
optional arguments:
-h, --help show this help message and exit
Convert a singular .itermcolors to a base24 scheme
usage: iterm2base24.py [-h] file
Convert .itermcolors to base24 scheme
positional arguments:
file file.itermschemes
optional arguments:
-h, --help show this help message and exit
Convert a profiles.json (such as your own) to a number of base24 schmes
usage: windowsTerminal2b24.py [-h] file
Convert profiles.json to base24 scheme
positional arguments:
file profiles.json
optional arguments:
-h, --help show this help message and exit
Suggest scheme colours based on a base24 theme template and the theme file
usage: schemeSuggest [-h] [--mode MODE] template theme
Pair colours with base24 colour ids
positional arguments:
template relative or abs path to the base24 template
theme relative or abs path to the theme file
optional arguments:
-h, --help show this help message and exit
--mode MODE color format: hex (ff00aa), reversehex (aa00ff), rgb (255,0,170), reversergb (170,0,255), dec (1.0,0,0.666),
reversedec (0.666,0,1.0)
Take and existing theme and a base24 scheme file and produces a base24 template
file
usage: templateGen [-h] [--mode MODE] [--fuzz FUZZ] colour_scheme theme
Generate a base24 template from an existing scheme and a theme file
positional arguments:
colour_scheme relative or abs path to the base24 colour scheme
theme relative or abs path to the theme file
optional arguments:
-h, --help show this help message and exit
--mode MODE color format: hex (ff00aa), reversehex (aa00ff), rgb (255,0,170), reversergb (170,0,255), dec (1.0,0,0.666),
reversedec (0.666,0,1.0)
--fuzz FUZZ find 'close' colours and replace these ((r,g,b)+-fuzz: default=0, max-recommended=5)
Generate a table to put in a scheme project readme
usage: schemeTableGen.py [-h] scheme
Generate a table to put in a scheme project readme
positional arguments:
scheme base24 scheme file
optional arguments:
-h, --help show this help message and exit
This program has been written for Python 3 and has been tested with
Python version 3.8.0 https://www.python.org/downloads/release/python-380.
choco install python
To install Python, go to https://www.python.org and download the latest
version.
sudo apt install python3.8
./[file].py
$ git clone https://github.com/Base24/base24-helpers
More information can be found at
https://help.github.com/en/articles/cloning-a-repository
More information can be found at
https://help.github.com/en/desktop/contributing-to-projects/cloning-a-repository-from-github-to-github-desktop
MIT License
Copyright (c) Base24
(See the LICENSE for more information.)
See the Changelog for more information.
In the interest of fostering an open and welcoming environment, we
as contributors and maintainers pledge to make participation in our
project and our community a harassment-free experience for everyone.
Please see the
Code of Conduct for more information.
Contributions are welcome, please see the Contributing Guidelines for more information.
Thank you for improving the security of the project, please see the Security Policy for more information.