Sha256: 112b01415ad06af9b9c00c6c589d1687bfce616decf1590297e62573124ef0cc
Contents?: true
Size: 297 Bytes
Versions: 25
Compression:
Stored size: 297 Bytes
Contents
class NSArray # [160, 210, 242].uicolor => 0xA0D2F2.uicolor def uicolor(alpha=1.0) red = self[0] / 255.0 green = self[1] / 255.0 blue = self[2] / 255.0 if self[3] alpha = self[3] end UIColor.colorWithRed(red, green:green, blue:blue, alpha:alpha.to_f) end end
Version data entries
25 entries across 25 versions & 1 rubygems