ARGB color is different on iOS in comparison to Android
<p>Take #2066E100 (ARGB8888) as an example, preview the color in Android:
<a href="https://i.stack.imgur.com/t3pd2.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/t3pd2.png" alt="enter image description here"></a> (dark green)</p>

<p>However, in iOS, the resulted color is like this: <a href="https://i.stack.imgur.com/9Exza.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/9Exza.png" alt="enter image description here"></a> (light yellow)</p>

<p>It seems to me that the alpha channel doesn't work the same way in iOS and Android. So my question is that is there a general scheme to convert argb color from Android to iOS?</p>

<p>I want to make iOS display the same color with Android's.</p>

<p><b>Edit: more images (this time I use #4066E100)</b></p>

<p>Android: <a href="https://i.stack.imgur.com/u6Z61.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/u6Z61.png" alt="enter image description here"></a></p>

<p>iOS: <a href="https://i.stack.imgur.com/dWR9c.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/dWR9c.png" alt="enter image description here"></a></p>

<p><b> Edit: add swift code</b></p>

<pre><code>if let context = CGBitmapContextCreate(&amp;colors, dim, dim, 8, 4 * dim, CGColorSpaceCreateDeviceRGB(), CGImageAlphaInfo.PremultipliedLast.rawValue | CGBitmapInfo.ByteOrderDefault.rawValue) {
        if let cgimage = CGBitmapContextCreateImage(context) {
            let uiimage = UIImage.init(CGImage: cgimage)
            return uiimage
        }
    }
</code></pre>