A lightweight toolset for colour manipulation, ported from polished.js
While writing Go Pixels Fight! I needed to be able to mix two colours to produce an average of the two to show which colour was winning; during my research I stumbled upon the color helpers in polished.js and while they didn't work for what I needed I thought it would be useful to myself in the future and others if they were ported to Go.
Primarily as a learning exercise in how to write tests with Golang I release this port to the wild in the hope that it may be of some use to someone.
...
- adjust hue
- complement
- darken
- desaturate
- get luminance
- grayscale
- HSL
- HSL to Colour String
- HSLA
- invert
- lighten
- mix
- opacify
- parse to HSL
- parse to RGB
- readable colour
- RGB
- RGB to Colour String
- RGBA
- saturate
- set hue
- set lightness
- set saturation
- shade
- tint
- to Colour String
- transparentise