Skip to main content
Inconsistent Software

Color Picker for Unity

Back in 2014, when the Unity UI was new, I had an idea to make a color picker to use in game using the new UI system. Thus, HSV Color Picker was created. Nearly 9 years later, the library has reached 500+ stars on GitHub! It's wild to me that potentially that many people are using code I wrote in their games.

Color pickers showing off the different features they support.

Look at all the color pickers.

Foxis yell

Foxis: How is it 9 years already?! It doesn't feel that long ago.

Why I Made It #

When the new UI system came out, I was excited. The old system worked, but had a lot of limitations and very programmer centric. The new system looked great with it's WYSIWYG editing that aligned more with Unity's visual editor and component system approach. I was thinking about character creation and how players should be able to change the color of their hair or cloths, and there wasn't much around for doing that. I think at that time, I was also learning about some color theory and how Hue-Saturation-Value (HSV) was calculated. I also wanted to contribute to open source. Everything aligned, and I started the color picker project as an open sourced licensed project. My main goal was to make something I can use for my game, but with the secondary goal of making a nice UI component other people can use.

Maintenance #

Maintenance has not been a bad experience. Some people contributed early to help get it going, and the overall interest has kept me going with development. There was a spike of interest during Hacktoberfest years ago, which lead to some of my own interest into the event.

For Unity version support, I've been keeping it current with the oldest Unity LTS version. I accidentally dropped Unity 2018 support early, so I'm a lot more careful with the supported versions. Luckily, there hasn't been too many breaking changes over the years, except for nested prefabs and some version changes for TextMeshPro.

Final Thoughts #

It's been a while since I really dug into the code, but I think I'm going to do a rewrite to use Scriptable Objects for the color sets at some point. I also want to check out the new, new UI system and see if I can make a color picker for that.

Here's to more years of open source maintenance! It's probably time to check support for Unity's 2022 LTS Version.

Buy Me a Coffee at ko-fi.com

If you want to leave a comment, message me on Discord or on Fediverse / Mastodon!

Share on Fediverse / Mastodon!