#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

3 releases

new 0.9.2 Nov 20, 2024
0.9.1 May 23, 2024
0.9.0 May 15, 2024

#7 in #waybar

GPL-3.0+

32KB
334 lines

color_scheme_generator

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 can be used 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
[{"bar_color":{"red":222,"green":186,"blue":189},"workspace_color":{"red":33,"green":69,"blue":66},"text_color":{"red":255,"green":255,"blue":255}}]
  1. YAML
- bar_color:
    red: 222
    green: 186
    blue: 189
  workspace_color:
    red: 33
    green: 69
    blue: 66
  text_color:
    red: 255
    green: 255
    blue: 255
  1. Text
DEBABD,214542,FFFFFF

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

Dependencies

~12–22MB
~310K SLoC