I am an artist and wanted to try something which Alexa can do for me, and thus came the idea in my mind, "Why not take the help of Alexa in mixing colors?"

What it does

Now mix colors with the snap of a finger! You can ask the skill to mix two colors or, you can use it to show color. For example, you can say, "Mix green and gold," and it will return you with the name and hex code of the new color formed. Also, you can ask "Show me the color Alpine Blue," and it will return the color in your Alexa companion app. The blending of the colors here is done by calculating the RMS value of the RGB values. The skill tries to find the name of the new color formed, but if it does not find any, then it will return the name of the color closest to it.

How I built it

The complete backend was made in Python using the flask-ask module. Flask-Ask is a Flask extension that makes building Alexa skills for the Amazon Echo easier and much more fun. The app is hosted on Heroku.

Skill Flow Graph

Challenges I ran into

Mixing of two colors using their RGB values was a challenge. I didn't know what kind of mixing is required, whether to add, subtract or take a simple average. Finally, I was satisfied with the RMS. Also, finding a name for the color was a headache. I had a small database, thus if I didn't found the actual name for the color then I searched for the closest color to it and returned that instead. Displaying the color to echo Display devices (Show and Spot) was also a challenge with flask-ask, but I could figure it out eventually.

Accomplishments that I'm proud of

I'm happy that I could complete making this Alexa Skill.

What I learned

I learned about a few new Python modules to work with colors.

What's next for Painter

Mixing more than two colors will be my next target. As of now I only support 16,884 colors of the possible 16,777,216 distinct colors in the RGB spectrum. I hope to increase it in the future.

Built With

Share this project: