Bug 42026 - Check support for wide color
Summary: Check support for wide color
Status: RESOLVED ANSWERED
Alias: None
Product: iOS
Classification: Xamarin
Component: Xamarin.iOS.dll ()
Version: XI 9.99 (iOS 10 previews)
Hardware: PC Mac OS
: High major
Target Milestone: Xcode8 (iOS10)
Assignee: Alex Soto [MSFT]
URL:
Depends on:
Blocks:
 
Reported: 2016-06-21 09:49 UTC by Rolf Bjarne Kvinge [MSFT]
Modified: 2016-09-06 12:56 UTC (History)
5 users (show)

Tags:
Is this bug a regression?: No
Last known good build:

Notice (2018-05-24): bugzilla.xamarin.com is now in read-only mode.

Please join us on Visual Studio Developer Community and in the Xamarin and Mono organizations on GitHub to continue tracking issues. Bugzilla will remain available for reference in read-only mode. We will continue to work on open Bugzilla bugs, copy them to the new locations as needed for follow-up, and add the new items under Related Links.

Our sincere thanks to everyone who has contributed on this bug tracker over the years. Thanks also for your understanding as we make these adjustments and improvements for the future.


Please create a new report on Developer Community or GitHub with your current version information, steps to reproduce, and relevant error messages or log files if you are hitting an issue that looks similar to this resolved bug and you do not yet see a matching new report.

Related Links:
Status:
RESOLVED ANSWERED

Description Rolf Bjarne Kvinge [MSFT] 2016-06-21 09:49:01 UTC
With the introduction of wide color support in iOS 10, some color API that were previously accepting a range of 0.0-1.0 for rgba values, are now accepting values in a wider range (negative, >1.0).

We need to check to make sure our API supports the same range as the underlying iOS API.
Comment 1 Vincent Dondain [MSFT] 2016-06-27 14:56:41 UTC
Yes looks like the doc for UIColor agrees with you: https://developer.apple.com/reference/uikit/uicolor

Quick test in Objective-C shows that negative values are allowed.
Comment 3 Sebastien Pouliot 2016-09-03 14:24:14 UTC
@Alex, this should not affect the API signatures but it's worth fixing before the release.
Comment 4 Alex Soto [MSFT] 2016-09-05 21:02:20 UTC
I have reviewed CGColor, NSColor, UIColor, CGColorSpace and a grep of rgb in our manual bindings and could not find a single instance where we are checking values are higher than 1 or lower than 0 (negatives) or usage of any unsigned type.
Comment 5 Sebastien Pouliot 2016-09-06 12:56:32 UTC
That answers our (lack of) need to update such code, thanks!