Essentials icon indicating copy to clipboard operation
Essentials copied to clipboard

[Bug] [iOS] Color conversion not quite right on iOS - apparent on Browser.OpenAsync

Open GalaxiaGuy opened this issue 3 years ago • 4 comments

Description

Some part of the conversion through Xamarin.Forms.Color => System.Drawing.Color => UIColor is not quite right.

I noticed this when trying to set PreferredToolbarColor when using Browser.OpenAsync and noticed the color does not match.

Steps to Reproduce

  1. Use Browser.OpenAsync with a PreferredToolbarColor that matches one of app colors.

Expected Behavior

The colors look the same.

Actual Behavior

The colors look different.

Basic Information

  • Version with issue: 1.6.1

Screenshots

Reproduction Link

https://github.com/galaxiaguy/xf-bugs/tree/bug/platform-color

GalaxiaGuy avatar Mar 30 '21 08:03 GalaxiaGuy

I think this may be fixed with https://github.com/xamarin/Essentials/pull/1716

jamesmontemagno avatar Apr 13 '21 19:04 jamesmontemagno

Same problem here ... hex color #296E4B, resulting in this difference: image

Any idea on how to fix that would be great...

MSicc avatar Feb 03 '22 04:02 MSicc

I did some more investigations on that matter. Even when setting no color at all or using the iOS SystemColors, the colors of the SfSafariViewController bars are different. I am not sure if this is a Xamarin.Forms or a (Xamarin.) iOS Problem at this point.

MSicc avatar Feb 18 '22 04:02 MSicc

Seeing the same still on iOS 15.4.1 and essentials 1.7.1.

mackayn avatar Apr 29 '22 08:04 mackayn