Skip to content

ToCGColor() should use sRGB colorspace on iOS #56

Open

Description

@kayle

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;

Activity

  1. HEFRNicolas commented on Jul 17, 2017

    @HEFRNicolas

    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

  2. added this to the v2.0 milestone on Nov 28, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions