Forked from: @SeungheonOh/ColTerm
Changes include: Modifications to flags, added colors up to 16, support for my custom Xresources scheme and dotfile setup.
Simper, more Unix-philosophical implementation of auto colorscheme generator. It gets Image as an input, gives you a well generated color scheme.
Well, as you notice, it's really similar to pywal. Unlike pywal, colterm is designed make a colorscheme only, but not to manage whole wallpaper system, therefore it's a lot simpler. You might ask, then why should I use it? I would say colterm would work best for those of you who would save your colorschemes by a image instead of having not really clean or commented clusters of colorschemes in you config files. You can just save a file with bunch of image links that you like, and use colterm to got a colorscheme without any dirty work of copying/finding/uncommenting colorschemes.
It supports only Xresources. However, you can input a Tamplate
for your config with placesholders (like background
or color1
) to generate any kinds of configs.
Nope, only Go standard libraries (I wrote the coloring algorithm by myself, compactly). You need xrdb
to set Xresources however.
USAGE:
colterm <OPTIONS> <FILE/URL>
OPTIONS:
-bg int
Set background brightness(0 - 255) (default 20)
-sn string
The scheme name to give, will be part of the export(ex) path
-ex string
Export file to (Path) (default ~/.xres/themes/(sn))
-f string
Input file, use this option or put file behind the options
-fg int
Set foreground brightness(0 - 255) (default 150)
-po bool
Print colors only without applying to Xresources (default true)
Example: ./colterm -po=false -f=https://i.imgur.com/XULiMJ5.jpg -sn=purple
produces the same result as screenshot above.
Resulting file will look like:
!! Colors (purple - https://i.imgur.com/XULiMJ5.jpg)
! defines
#define BACKGROUND #171423
#define FOREGROUND #A496C6
#define COLOR0 #5A0E50
#define COLOR8 #5A0E50
#define COLOR1 #B3439E
#define COLOR9 #B3439E
#define COLOR2 #463A64
#define COLOR10 #463A64
#define COLOR3 #E8BFE9
#define COLOR11 #E8BFE9
#define COLOR4 #742282
#define COLOR12 #742282
#define COLOR5 #B83FC3
#define COLOR13 #B83FC3
#define COLOR6 #A1B3E2
#define COLOR14 #A1B3E2
#define COLOR7 #C57DCE
#define COLOR15 #C57DCE
! colors
*foreground: FOREGROUND
*background: BACKGROUND
*color0: COLOR0
*color8: COLOR8
*color1: COLOR1
*color9: COLOR9
*color2: COLOR2
*color10: COLOR10
*color3: COLOR3
*color11: COLOR11
*color4: COLOR4
*color12: COLOR12
*color5: COLOR5
*color13: COLOR13
*color6: COLOR6
*color14: COLOR14
*color7: COLOR7
*color15: COLOR15
go build -o colterm .