ColorTools

$9
Publisher LotteMakesStuff
File size 54.69kB
Number of files 12
Latest version v1.0
Latest release date 2014-09-25 08:11:35
First release date 2014-09-24 10:01:19
Supported Unity versions 2018.4.2 or higher
ColorTools is a comprehensive collection of extensions to the Unity API to make reasoning about color much more simple. Many seemingly simple tasks are actually incredibly difficult to solve with traditional RGB color systems.

* How would you randomly generate only bright, vivid colors?
* How would you figure out if two customizable player team colors are too similar?
* How do you invert a color to get one that’s totally different?
* How do you darken or lighten a color?

All of these problems are really easy to solve with HSL colors! ColorTools can seamlessly convert colours between Unity native RGB representation and a new HSL representation. It provides loads of extension methods that help simplify reasoning about color in your code.

Features:
* A full ColorHSL implementation with easy conversion to and from Unity colors
* Extension methods to make Lightening, Darkening, Desaturating, converting to Grayscale and similar operations incredibly easy.
* Fire and forget Coroutines for animating colors over time
* Helper methods for easily generating randomized Bright, Dark and Pastel colors
* Photoshop style blending operations (Multiply, Screen, Overlay, Difference, Average and Negation)
* Loads of predefined colors.

Top Publisher Assets