Colorful Code
Posted by Patrick on Monday, January 31, 2011Mon, Jan 31, 2011
c/c++
snippet

I was planning to write another post on Archivist for this week, but with Swivel in the approval process I am pressed for time to get my promotion materials together. So instead here’s a quick snippet of code that may be useful to you.

Color values are one of those things that you don’t really think about until you need them. And when you do you might fire up Photoshop or the DigitalColor Meter and get some RGB values to work with. But then you either have to manage a bunch of custom color constants, or stare at those RGB values and do the color mixing in your head. To make things easier on myself, I put together a list of predefined color constants to pick from:

There’s more to it than this, but this is the important stuff. And if you’re wondering what all those color constants look like, here’s a handy-dandy chart:

Color Constant Chart

This post is part of iDevBlogADay, a group of blogs by indie iPhone developers featuring two posts per day. You can subscribe to iDevBlogADay through RSS or follow the #iDevBlogADay hash tag or @idevblogaday on Twitter.