Open avh4 opened 6 years ago
Recently I adopted elm-color in my personal project.
As a small input to this matter, here's ColorExtra
module I prepared to serve my needs: https://github.com/ymtszw/zephyr/blob/master/src/ColorExtra.elm
Regarding to color manipulation, I ended up exposing two of them: brightness
and setAlpha
brightness
relates to OP-proposed darken/lightenBy
series. In my case it shifts brightness of colors by a factor of 1.15, to a power of specified float value. (i.e. (red|blue|green) * 1.15 ^ input
) Although **By
should be OK, too.setAlpha
literally sets just alpha value of a Color
Rough ideas