Defold Color

Defold Color

Library to modify, transform and convert colors. To use defined named colors and paletts, generate random colors and get a random palett.

There are a few modules in it to help with anything color. Here’s a quick overview!


Convert to and from different color modes. Supports hex, hsv, and rgba.
The to_* methods takes vectors and the from_* returns vectors.


Pick your method and a color and it will give you the colors it harmonizes with, you have a few methods to choose from:
complementary, monochromatic, analogous, split_complementary, triadic and tetradic.

If these are just weird words to use I you can always use the example in the project to check them out, but here are some examples. The color the furthest left is the input color.


Simple color math made simpler. Can help you invert colors, get the difference, screen them together, overlay them or a few other convenient things.


Contains a few “ready for you” palette that I think looks nice with some words I though fit.


Contains all colors from w3c (sometimes called css or html colors). You can go to something like HTML Color Names pick a color name you like and use that directly without having to memorize any color values or hex codes.


Looks like the same idea as:


Interestingly enough we seems to have started them around the same time 2 years ago! I totally forgot to post about mine on the forum though, only remembered now cause I made a small app in Defold which used it.

But the libraries doesn’t seem very similar :slight_smile:

Correct me if I am wrong but klaytonkowalski/library-defold-colors seems to be for creating and managing palettes with the ability to convert to different color spaces.

While jerakin/defold-colors is for modifying and transforming colors with the ability to convert to different color spaces. It have some convenient palettes and colors that are already predefined.

Basically, one is for doing math with colors and one is for managing user defined palettes :slight_smile:


Perfect addition! I was using Klayton’s Defold Colors several times , it’s very useful and now we have even more, so great! :heart_eyes: