From a53f1a807ec956c4a4ec2c32b907cf85daa36932 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Minh=20Nguye=CC=82=CC=83n?= Date: Wed, 7 Mar 2018 15:44:47 -0800 Subject: [macos] Test only SRGB color --- platform/darwin/test/MGLTileSetTests.mm | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/platform/darwin/test/MGLTileSetTests.mm b/platform/darwin/test/MGLTileSetTests.mm index 9b74e45db2..0a721a1528 100644 --- a/platform/darwin/test/MGLTileSetTests.mm +++ b/platform/darwin/test/MGLTileSetTests.mm @@ -67,11 +67,13 @@ MGLAttributionInfo *mapboxInfo = [[MGLAttributionInfo alloc] initWithTitle:[[NSAttributedString alloc] initWithString:@"Mapbox"] URL:[NSURL URLWithString:@"https://www.mapbox.com/"]]; MGLColor *redColor = [MGLColor redColor]; -#if !TARGET_OS_IPHONE +#if TARGET_OS_IPHONE + redColor = [UIColor redColor]; +#else // CSS uses the sRGB color space. In macOS 10.12 Sierra and below, // -[NSColor redColor] is in the calibrated RGB space and has a slightly // different sRGB value than on iOS and macOS 10.13 High Sierra. - redColor = [redColor colorUsingColorSpace:[NSColorSpace sRGBColorSpace]]; + redColor = [NSColor colorWithSRGBRed:1 green:0 blue:0 alpha:1]; #endif NSAttributedString *gl = [[NSAttributedString alloc] initWithString:@"GL" attributes:@{ NSBackgroundColorAttributeName: redColor, -- cgit v1.2.1