example pic (hopefully)

This commit is contained in:
whut 2022-07-07 21:32:08 -05:00
parent fbd9452b27
commit bce7f4356d
2 changed files with 30 additions and 25 deletions

View File

@ -15,6 +15,9 @@ This creates a color scheme with:
- An accent color with that same hue but more saturation (hue 0.6, chroma 0.5) - An accent color with that same hue but more saturation (hue 0.6, chroma 0.5)
- Some shade of gray for the foreground color (hue 0.0, chroma 0.0). In this case it'll be a light gray since the background is dark. - Some shade of gray for the foreground color (hue 0.0, chroma 0.0). In this case it'll be a light gray since the background is dark.
Here's the preview it'd generate:
![Color scheme preview](https://pomf2.lain.la/f/mbnay7gd.png)
## Prerequisites ## Prerequisites
- Python 3 - Python 3
@ -24,15 +27,17 @@ This creates a color scheme with:
***Obligatory "options are subject to change" courtesy warning*** ***Obligatory "options are subject to change" courtesy warning***
- `-a author`: Set the author name.
- `-b amount`: Make the hue colors blend with the background's hue. 0.0 (default) means no blending, 1.0 makes them the same exact color. If you'd like to have them be the same hue but with different brightnesses, use a value like 0.999.
- `-c contrast`: Desired contrast ratio between the foreground and background colors. Default is 7. 21 guarantees the highest possible contrast (i.e. the foreground will either be white or black).
- `-e`: Equiluminant mode; uses the same luminance for the hues. This keeps their brightness uniform but can make them harder to tell apart.
- `--hsl`: Treat the background color as being gamma-encoded HSL (i.e. what most people are used to). Wouldn't recommend it, but if it works for you...
- `-m mode`: Which generator to use. Current generators: - `-m mode`: Which generator to use. Current generators:
- `base16` (default): Base16 - `base16` (default): Base16
- `xresources`: Xresources terminal colors - `xresources`: Xresources terminal colors
- `-n name`, `-a author`: Set the scheme and author name. - `-n name`: Set the scheme name.
- `--hsl`: Treat the background color as being gamma-encoded HSL (i.e. what most people are used to). Wouldn't recommend it, but if it works for you...
- `-e`: Equiluminant mode; uses the same luminance for the hues. This keeps their brightness uniform but can make them harder to tell apart.
- `-b amount`: Make the hue colors blend with the background's hue. 0.0 (default) means no blending, 1.0 makes them the same exact color. If you'd like to have them be the same hue but with different brightnesses, use a value like 0.999.
- `-p`: Generate a preview image demonstrating color contrast and the palette itself. - `-p`: Generate a preview image demonstrating color contrast and the palette itself.
- `-c contrast`: Desired contrast ratio between the foreground and background colors. Default is 7. 21 guarantees the highest possible contrast (i.e. the foreground will either be white or black).
- Base16 options: - Base16 options:
- `-l`: Don't darken the last color (brown). - `-l`: Don't darken the last color (brown).

View File

@ -6,21 +6,6 @@ modes = ["base16","xresources"]
RED, YELLOW, GREEN, CYAN, BLUE, MAGENTA = 0, 60, 120, 200, 240, 300 RED, YELLOW, GREEN, CYAN, BLUE, MAGENTA = 0, 60, 120, 200, 240, 300
parser = optparse.OptionParser(usage="usage: %prog [options] background accent [foreground]") parser = optparse.OptionParser(usage="usage: %prog [options] background accent [foreground]")
parser.add_option("-m", "--mode",
action="store",
dest="mode",
default="base16",
help="what to generate ({})".format(", ".join(modes)))
parser.add_option("-p", "--preview",
action="store_true",
dest="showPreview",
default=False,
help="generate a preview image")
parser.add_option("-n", "--name",
action="store",
dest="name",
default="acid16",
help="scheme name")
parser.add_option("-a", "--author", parser.add_option("-a", "--author",
action="store", action="store",
dest="author", dest="author",
@ -31,16 +16,31 @@ parser.add_option("-b", "--hue-blend",
dest="hueBlend", dest="hueBlend",
default=0.0, default=0.0,
help="mix ratio between hues and background") help="mix ratio between hues and background")
parser.add_option("-e", "--equiluminant",
action="store_true",
dest="equiluminant",
default=0.0,
help="use the same luminance for last hues")
parser.add_option("-c", "--contrast", parser.add_option("-c", "--contrast",
action="store", action="store",
dest="foreContrast", dest="foreContrast",
default=7.0, default=7.0,
help="contrast between foreground and background (default 7)") help="contrast between foreground and background (default 7)")
parser.add_option("-e", "--equiluminant",
action="store_true",
dest="equiluminant",
default=0.0,
help="use the same luminance for last hues")
parser.add_option("-m", "--mode",
action="store",
dest="mode",
default="base16",
help="what to generate ({})".format(", ".join(modes)))
parser.add_option("-n", "--name",
action="store",
dest="name",
default="acid16",
help="scheme name")
parser.add_option("-p", "--preview",
action="store_true",
dest="showPreview",
default=False,
help="generate a preview image")
parser.add_option("--hsl", parser.add_option("--hsl",
action="store_true", action="store_true",
dest="hsl", dest="hsl",