oxyplot-xamarin
oxyplot-xamarin copied to clipboard
ToCGColor() should use sRGB colorspace on iOS
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;
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.