motion/core.rb in bubble-wrap-1.5.0 vs motion/core.rb in bubble-wrap-1.6.0.rc1
- old
+ new
@@ -7,9 +7,12 @@
end
# @return [UIcolor]
def rgba_color(r,g,b,a)
r,g,b = [r,g,b].map { |i| i / 255.0}
+ if a > 1.0
+ a = a / 255.0
+ end
if App.osx?
NSColor.colorWithDeviceRed(r, green: g, blue: b, alpha: a)
else
UIColor.colorWithRed(r, green: g, blue:b, alpha:a)
end