#waybar #sway #theming #command-line-tool #color-scheme #cli #image-analisis

bin+lib color_scheme_generator

A Command line utility to quickly and easily create color themes from an image

2 releases

0.9.1 May 23, 2024
0.9.0 May 15, 2024

#1523 in Command line utilities

Download history 130/week @ 2024-05-13 96/week @ 2024-05-20

226 downloads per month


334 lines

Quickly generate color schemes for waybar from an image.

color_scheme_generator is a command line utility used to analyze images and generate color themes from them given a path to an image.

This command line utility behaves like a standard UNIX utility where the path to the image can be either piped in or sent a command line argument.

The intended purpose of this application is to automatically create color themes for Waybar, but it used for the bar in AwesomeWM or other applications to theme based on the on an image. This utility has a cache for the image analysis. This means that once an image has been analyzed once, the result will be saved in the cache and when an image is analyzed again, the results will be returned instantly.

Usage Examples

echo PATH_TO_IMAGE | color_scheme_generator
color_scheme_generator PATH_TO_IMAGE

Output Formats

color_scheme_generator can output to 3 different output formats all of which give an RGB8 value in the form of "bar_color", "workspace_color" and "text_color":

  1. JSON
  1. YAML
- bar_color:
    red: 222
    green: 186
    blue: 189
    red: 33
    green: 69
    blue: 66
    red: 255
    green: 255
    blue: 255
  1. Text

The text output has the format of BAR_COLOR,WORKSPACE_COLOR,TEXT_COLOR.


~305K SLoC