WatchKit UI Colors

When I was developing the first version of the watch app for Today Timer I noticed something a bit odd. For a running or paused timer I was setting the background color of the table row for that timer. The docs say that that if you set the background color of a WKInterfaceGroup to nil the group uses the default background color of clear. Which I think is true, but the table sets the row background color to a what looks like a really dark gray. After some digging around I came up with a file named Guide_ButtonTable_Rows_Colors.psd that you can download from the Watch Human Interface Guidelines (look under Resources->Guides).

Turns out the WKInterfaceGroup provided for a table row is configured as a "platter" so it has this platter color, which is actually a pretty bright white at a very low alpha. (RGB 242, 244, 252 at 14% opacity.) Since I was overwriting the background color when I wanted to "clear" that change I needed to set back this custom color in order to make everything look right.

I've used a category on UIColor that provides the colors used in iOS7 style UI for a while, here's the original repository and here's my fork which makes the code compile with -Wno-semicolon-before-method-body and adds the default tint color. So I wanted something similar, but I didn't think the WatchKit colors belongs in iOS7Colors. I just pushed a UIColor Swift extension to GitHub. Although it's written in Swift you can drop it in an Objective-C project and use it. There's a sample app in the repository that shows the colors and how to use it.

If you're coding WatchKit hopefully you'll find this useful!