oxyplot-xamarin icon indicating copy to clipboard operation
oxyplot-xamarin copied to clipboard

ToCGColor() should use sRGB colorspace on iOS

Open kayle opened this issue 7 years ago • 1 comments

Currently I see a different color on iOS 10 if I use the same hex background color for a chart as another control on the page (e.g. "#25373E"). Using the Srgb color space seems to fix the issue for me.

var space = CoreGraphics.CGColorSpace.CreateSrgb();
var cgColor = new CGColor(space, new nfloat[] { c.R / 255f, c.G / 255f, c.B / 255f, c.A / 255f });
return cgColor;

kayle avatar Mar 13 '17 16:03 kayle

I'm also having trouble with colours on iOS. In my case I've set the background of my layout to the same colour of one of my pie slices, but it looks like the pie slice is a bit lighter. screen shot 2017-07-17 at 10 06 05

HEFRNicolas avatar Jul 17 '17 08:07 HEFRNicolas