A command line tool for modifying and converting colour values for use with CSS etc.
Switch branches/tags
Nothing to show
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
.gitignore
LICENSE
README.md
build.sh
format.go
format_test.go
main.go
main_test.go
parse.go
parse_test.go

README.md

Shue

A command line tool for modifying and converting colour values for use with CSS etc.

Supported formats

  • Six-digit hex, e.g. #ff8000
  • Three-digit hex, e.g. #f80
  • Three-part RGB, e.g. rgb(255, 128, 0)

Supported operations

  • Lighten n%
  • Set value
  • Invert

Usage

Usage: shue [OPTIONS] [COLOUR] FORMAT

  Converts COLOUR to FORMAT. COLOUR must be in one of the supported formats.

Supported formats:
  hex:      #rrggbb
  h3x:      #rgb
  rgb:      rgb(red, green, blue)

Options:
  -l PERCENT    Lighten COLOUR by PERCENT% before converting to FORMAT
  -i            Invert COLOUR before converting to FORMAT

Building

Run go build.

Or you can download a binary from the releases page.

Examples

Converting a colour to a specific format:

$ shue -f rgb ff8800
rgb(255, 136, 0)

Inverting a colour:

$ shue -i ff8800
#07f
#0077ff
rgb(0, 119, 255)

Lightening a colour:

$ shue -l 200 884400
#f80
#ff8800
rgb(255, 136, 0)

Darkening a colour:

$ shue -l 50 884400
#420
#442200
rgb(68, 34, 0)