Songs of the Dying Earth - George. R. R. Martin & Gardner Dozois

Permalink - Comments - Tags: Books,Review,GRRM
Photoshop hex RGB to a UIColor

Adam (the awesome goCatch designer) and I got sick of converting from hex RGB colors to decimal UIColor initialisation params, so I wrote this script.
import sys
if (len(sys.argv) != 2):
print ("convert.py <hex color>")
sys.exit ()
color = sys.argv[1]
if (len (color) != 8):
print ("convert.py <8 char hex color>")
sys.exit ()
# get the two character chunks
red = color[:2]
green = color[2:4]
blue = color[4:6]
alpha = color[6:8]
decRed = int (red,16) / 255.0
decGreen = int (green,16) / 255.0
decBlue = int (blue,16) / 255.0
decAlpha = int (alpha,16) / 255.0
#iOS code
print ("[UIColor colorWithRed:%.4f green:%.4f blue:%.4f alpha:%.4f];" % (decRed, decGreen, decBlue, decAlpha))
#Android code
print ("private static final int COLOR = 0x"+alpha+red+green+blue);
Yep it also does an Android static final int. We love Android too ;)
Permalink - Comments - Tags: Development,Android,iPhone
Thanks for the fish
At the end of a nine years at Cognethos. Today, nine years at any company is a ridiculously long time. Though the company expanded and contracted over time, the core group of employees stayed the same. We worked through boom times, global financial crisis, uncertainty, wild speculation and fundamental disagreement, and somehow managed to treat each other with respect. I am proud of the work we produced and grateful for everything I learnt.
I don't need to wish this very talented group of people luck, as clearly they won't need it.
Permalink - Comments - Tags: Development,Misc
[First Page] [Prev] Showing page 6 of 6 pages [Next] [Last Page]