manosim / ui-color

Converting HEX & RGB colors to UIColor for both Objective C & Swift.
https://www.uicolor.io/
MIT License
225 stars 39 forks source link

Use `colorWithRed:145.0/255.0` rather than `colorWithRed:0.57` #18

Open pkamb opened 8 years ago

pkamb commented 8 years ago

Love the site.

My one suggestion would be that the Cocoa standard seems to usually be /255 fractions:

[UIColor colorWithRed:145.0/255.0 green:76.0/255.0 blue:76.0/255.0 alpha:1];

Rather than uicolor.io's decimal output:

[UIColor colorWithRed:0.57 green:0.30 blue:0.30 alpha:1.0];

Although more verbose, the former allows for easy human parsing of the RGB colors from the UIColor code.