diff --git a/apple/OmnivoreKit/Sources/Utils/ColorUtils.swift b/apple/OmnivoreKit/Sources/Utils/ColorUtils.swift index 66d5f4bc2..7718fbf88 100644 --- a/apple/OmnivoreKit/Sources/Utils/ColorUtils.swift +++ b/apple/OmnivoreKit/Sources/Utils/ColorUtils.swift @@ -23,7 +23,6 @@ public extension Color { red = CGFloat((rgb & 0xFF0000) >> 16) / 255.0 green = CGFloat((rgb & 0x00FF00) >> 8) / 255.0 blue = CGFloat(rgb & 0x0000FF) / 255.0 - } else if length == 8 { red = CGFloat((rgb & 0xFF00_0000) >> 24) / 255.0 green = CGFloat((rgb & 0x00FF_0000) >> 16) / 255.0 @@ -53,27 +52,12 @@ public extension Color { let red = Float(components[0]) let green = Float(components[1]) let blue = Float(components[2]) - var alpha = Float(1.0) - if components.count >= 4 { - alpha = Float(components[3]) - } - - if alpha != Float(1.0) { - return String( - format: "%02lX%02lX%02lX%02lX", - lroundf(red * 255), - lroundf(green * 255), - lroundf(blue * 255), - lroundf(alpha * 255) - ) - } else { - return String( - format: "%02lX%02lX%02lX", - lroundf(red * 255), - lroundf(green * 255), - lroundf(blue * 255) - ) - } + return String( + format: "%02lX%02lX%02lX", + lroundf(red * 255), + lroundf(green * 255), + lroundf(blue * 255) + ) } }