I have been working on porting an iOS app to Android.

iOS applications specify colors using the UIColor class. 

Android specifies colors using #ARGB syntax. 

I was looking at lots of calls like:

[UIColor colorWithRed:0.3 green:0.85 blue:0.41 alpha:0.75];

and I needed to convert these to their equivalent hex codes.

Thus a basic Javascript utility was born. Check it out!