diff --git a/android/src/toga_android/colors.py b/android/src/toga_android/colors.py index 1d132e4d09..c8519d8281 100644 --- a/android/src/toga_android/colors.py +++ b/android/src/toga_android/colors.py @@ -22,10 +22,7 @@ def native_color(c): color = CACHE[c] except KeyError: color = Color.argb( - int(c.rgba.a * 255), - int(c.rgba.r), - int(c.rgba.g), - int(c.rgba.b), + int(c.rgba.a * 255), int(c.rgba.r), int(c.rgba.g), int(c.rgba.b) ) CACHE[c] = color diff --git a/gtk/src/toga_gtk/colors.py b/gtk/src/toga_gtk/colors.py index cd95ab8be8..beb6f6cf3b 100644 --- a/gtk/src/toga_gtk/colors.py +++ b/gtk/src/toga_gtk/colors.py @@ -5,12 +5,7 @@ def native_color(c): try: color = CACHE[c] except KeyError: - color = ( - c.rgba.r / 255, - c.rgba.g / 255, - c.rgba.b / 255, - c.rgba.a, - ) + color = (c.rgba.r / 255, c.rgba.g / 255, c.rgba.b / 255, c.rgba.a) CACHE[c] = color return color diff --git a/iOS/src/toga_iOS/colors.py b/iOS/src/toga_iOS/colors.py index 41b94e043b..25d80f3360 100644 --- a/iOS/src/toga_iOS/colors.py +++ b/iOS/src/toga_iOS/colors.py @@ -13,10 +13,7 @@ def native_color(c): except KeyError: # Color needs to be retained to be kept in the cache color = UIColor.colorWithRed( - c.rgba.r / 255, - green=c.rgba.g / 255, - blue=c.rgba.b / 255, - alpha=c.rgba.a, + c.rgba.r / 255, green=c.rgba.g / 255, blue=c.rgba.b / 255, alpha=c.rgba.a ).retain() CACHE[c] = color