Working with Wide Color - Apple Inc....File Formats and Color Profiles Use “Display P3” color...

251
© 2016 Apple Inc. All rights reserved. Redistribution or public display not permitted without written permission from Apple. Understanding and optimizing for Wide Color Gamut Displays System Frameworks #WWDC16 Session 712 Working with Wide Color Justin Stoyles Graphics and Media Patrick Heynen Cocoa Frameworks Steve Holt UIKit

Transcript of Working with Wide Color - Apple Inc....File Formats and Color Profiles Use “Display P3” color...

Page 1: Working with Wide Color - Apple Inc....File Formats and Color Profiles Use “Display P3” color profile for RGB working space Use 16 bit per channel color mode Use iMac (Late 2015)

© 2016 Apple Inc. All rights reserved. Redistribution or public display not permitted without written permission from Apple.

Understanding and optimizing for Wide Color Gamut Displays

System Frameworks #WWDC16

Session 712

Working with Wide Color

Justin Stoyles Graphics and MediaPatrick Heynen Cocoa FrameworksSteve Holt UIKit

Page 2: Working with Wide Color - Apple Inc....File Formats and Color Profiles Use “Display P3” color profile for RGB working space Use 16 bit per channel color mode Use iMac (Late 2015)

Agenda

What is wide color and why does it matter?

Adapting your content workflow

Implications on app colors

Optimizing your app drawing for wide color displays

Core Color Concepts

Page 3: Working with Wide Color - Apple Inc....File Formats and Color Profiles Use “Display P3” color profile for RGB working space Use 16 bit per channel color mode Use iMac (Late 2015)

Transforming coloron macOS and iOS

Page 4: Working with Wide Color - Apple Inc....File Formats and Color Profiles Use “Display P3” color profile for RGB working space Use 16 bit per channel color mode Use iMac (Late 2015)

Brief Overview

ColorSync International Color Consortium (ICC)Built in to OS X

Page 5: Working with Wide Color - Apple Inc....File Formats and Color Profiles Use “Display P3” color profile for RGB working space Use 16 bit per channel color mode Use iMac (Late 2015)

Brief Overview

Retina Display

Page 6: Working with Wide Color - Apple Inc....File Formats and Color Profiles Use “Display P3” color profile for RGB working space Use 16 bit per channel color mode Use iMac (Late 2015)

Brief Overview

Page 7: Working with Wide Color - Apple Inc....File Formats and Color Profiles Use “Display P3” color profile for RGB working space Use 16 bit per channel color mode Use iMac (Late 2015)

Core Color Concepts

Page 8: Working with Wide Color - Apple Inc....File Formats and Color Profiles Use “Display P3” color profile for RGB working space Use 16 bit per channel color mode Use iMac (Late 2015)

Core Color Concepts

color spaceColor Channels Color PrimariesColor Gamut

Page 9: Working with Wide Color - Apple Inc....File Formats and Color Profiles Use “Display P3” color profile for RGB working space Use 16 bit per channel color mode Use iMac (Late 2015)

Core Color Concepts

color spaceColor ChannelsColor PrimariesColor Gamut

Page 10: Working with Wide Color - Apple Inc....File Formats and Color Profiles Use “Display P3” color profile for RGB working space Use 16 bit per channel color mode Use iMac (Late 2015)

Core Color Concepts

color spaceColor ChannelsColor PrimariesColor Gamut

RGB SpacesGray Spaces

Page 11: Working with Wide Color - Apple Inc....File Formats and Color Profiles Use “Display P3” color profile for RGB working space Use 16 bit per channel color mode Use iMac (Late 2015)

Core Color Concepts

color spaceColor ChannelsColor PrimariesColor Gamut

Device Independent Spaces CMYK Spaces

Page 12: Working with Wide Color - Apple Inc....File Formats and Color Profiles Use “Display P3” color profile for RGB working space Use 16 bit per channel color mode Use iMac (Late 2015)

Core Color Concepts

color spaceColor ChannelsColor PrimariesColor Gamut

RGB {0.0, 0.0, 0.0} = Black

RGB {1.0, 1.0, 1.0} = White

RGB {1.0, 0.0, 0.0} = Red

Page 13: Working with Wide Color - Apple Inc....File Formats and Color Profiles Use “Display P3” color profile for RGB working space Use 16 bit per channel color mode Use iMac (Late 2015)

Core Color Concepts

color spaceColor ChannelsColor PrimariesColor Gamut

Page 14: Working with Wide Color - Apple Inc....File Formats and Color Profiles Use “Display P3” color profile for RGB working space Use 16 bit per channel color mode Use iMac (Late 2015)

What is wide color?

Page 15: Working with Wide Color - Apple Inc....File Formats and Color Profiles Use “Display P3” color profile for RGB working space Use 16 bit per channel color mode Use iMac (Late 2015)

Standard RGB Color Space (sRGB)

Widely usedBased on ITU-R BT.709

Gamma ≈ 2.2Typical lighting conditions Default color space for iOS

Page 16: Working with Wide Color - Apple Inc....File Formats and Color Profiles Use “Display P3” color profile for RGB working space Use 16 bit per channel color mode Use iMac (Late 2015)
Page 17: Working with Wide Color - Apple Inc....File Formats and Color Profiles Use “Display P3” color profile for RGB working space Use 16 bit per channel color mode Use iMac (Late 2015)
Page 18: Working with Wide Color - Apple Inc....File Formats and Color Profiles Use “Display P3” color profile for RGB working space Use 16 bit per channel color mode Use iMac (Late 2015)
Page 19: Working with Wide Color - Apple Inc....File Formats and Color Profiles Use “Display P3” color profile for RGB working space Use 16 bit per channel color mode Use iMac (Late 2015)

What do we do about this?

Page 20: Working with Wide Color - Apple Inc....File Formats and Color Profiles Use “Display P3” color profile for RGB working space Use 16 bit per channel color mode Use iMac (Late 2015)

Wide color space for today’s platformsBased on the SMPTE DCI-P3

Gamma ≈ 2.2Typical lighting conditions

Introducing Display P3

Display P3

sRGB

Page 21: Working with Wide Color - Apple Inc....File Formats and Color Profiles Use “Display P3” color profile for RGB working space Use 16 bit per channel color mode Use iMac (Late 2015)

Display P3 in Action

Page 22: Working with Wide Color - Apple Inc....File Formats and Color Profiles Use “Display P3” color profile for RGB working space Use 16 bit per channel color mode Use iMac (Late 2015)

Display P3 in Action

Page 23: Working with Wide Color - Apple Inc....File Formats and Color Profiles Use “Display P3” color profile for RGB working space Use 16 bit per channel color mode Use iMac (Late 2015)
Page 24: Working with Wide Color - Apple Inc....File Formats and Color Profiles Use “Display P3” color profile for RGB working space Use 16 bit per channel color mode Use iMac (Late 2015)

Color Management on iOS 10

Page 25: Working with Wide Color - Apple Inc....File Formats and Color Profiles Use “Display P3” color profile for RGB working space Use 16 bit per channel color mode Use iMac (Late 2015)

Introducing Extended Range sRGB

Same sRGB Primaries

Gamma ≈ 2.2Typical lighting conditionsNegative values and values greater than 1

Page 26: Working with Wide Color - Apple Inc....File Formats and Color Profiles Use “Display P3” color profile for RGB working space Use 16 bit per channel color mode Use iMac (Late 2015)

Extended Range sRGB in Action

Display P3{1.0, 0.0, 0.0}

Extended Range sRGB {1.358, -0.074, -0.012}

Page 27: Working with Wide Color - Apple Inc....File Formats and Color Profiles Use “Display P3” color profile for RGB working space Use 16 bit per channel color mode Use iMac (Late 2015)

Extended Range sRGB in Action

Display P3{1.0, 0.0, 0.0}

Extended Range sRGB {1.358, -0.074, -0.012}

Page 28: Working with Wide Color - Apple Inc....File Formats and Color Profiles Use “Display P3” color profile for RGB working space Use 16 bit per channel color mode Use iMac (Late 2015)

Precision and Color

2nd Floor

1st Floor

Page 29: Working with Wide Color - Apple Inc....File Formats and Color Profiles Use “Display P3” color profile for RGB working space Use 16 bit per channel color mode Use iMac (Late 2015)

Precision and Color

2nd Floor

1st Floor

Appropriate height

Page 30: Working with Wide Color - Apple Inc....File Formats and Color Profiles Use “Display P3” color profile for RGB working space Use 16 bit per channel color mode Use iMac (Late 2015)

Precision and Color

2nd Floor

1st Floor

Too tall

Page 31: Working with Wide Color - Apple Inc....File Formats and Color Profiles Use “Display P3” color profile for RGB working space Use 16 bit per channel color mode Use iMac (Late 2015)

Precision and Color

2nd Floor

1st Floor

8bit per color channel works well for sRGB

Page 32: Working with Wide Color - Apple Inc....File Formats and Color Profiles Use “Display P3” color profile for RGB working space Use 16 bit per channel color mode Use iMac (Late 2015)

Precision and Color

2nd Floor

1st Floor

8bit per color channel works well for sRGB

16bit per color channel for P3 and beyond

Page 33: Working with Wide Color - Apple Inc....File Formats and Color Profiles Use “Display P3” color profile for RGB working space Use 16 bit per channel color mode Use iMac (Late 2015)

We’ve Got You Covered

Core Image

Core Graphics

ImageIO

AppKitUIKit

SceneKit

SpriteKit

Core Animation

WebKit

Retina Display

Page 34: Working with Wide Color - Apple Inc....File Formats and Color Profiles Use “Display P3” color profile for RGB working space Use 16 bit per channel color mode Use iMac (Late 2015)

Adapting your content workflowWide Gamut Content

Patrick HeynenCocoa Frameworks

Page 35: Working with Wide Color - Apple Inc....File Formats and Color Profiles Use “Display P3” color profile for RGB working space Use 16 bit per channel color mode Use iMac (Late 2015)

Where does Wide Color come from?

Page 36: Working with Wide Color - Apple Inc....File Formats and Color Profiles Use “Display P3” color profile for RGB working space Use 16 bit per channel color mode Use iMac (Late 2015)

It comes from you!

Page 37: Working with Wide Color - Apple Inc....File Formats and Color Profiles Use “Display P3” color profile for RGB working space Use 16 bit per channel color mode Use iMac (Late 2015)

Apps and their Content

Page 38: Working with Wide Color - Apple Inc....File Formats and Color Profiles Use “Display P3” color profile for RGB working space Use 16 bit per channel color mode Use iMac (Late 2015)

Application Content Types

Page 39: Working with Wide Color - Apple Inc....File Formats and Color Profiles Use “Display P3” color profile for RGB working space Use 16 bit per channel color mode Use iMac (Late 2015)

Application Content Types

Static image resources

Page 40: Working with Wide Color - Apple Inc....File Formats and Color Profiles Use “Display P3” color profile for RGB working space Use 16 bit per channel color mode Use iMac (Late 2015)

Application Content Types

Static image resourcesDocument and network image resources

Page 41: Working with Wide Color - Apple Inc....File Formats and Color Profiles Use “Display P3” color profile for RGB working space Use 16 bit per channel color mode Use iMac (Late 2015)

Application Content Types

Static image resourcesDocument and network image resourcesAdvanced Media

Advances in iOS Photography Mission Tuesday 11:00AM

Editing Live Photos and Raw on iOS Marina Wednesday 3:15PM

Page 42: Working with Wide Color - Apple Inc....File Formats and Color Profiles Use “Display P3” color profile for RGB working space Use 16 bit per channel color mode Use iMac (Late 2015)

Application Content Types

Static image resourcesDocument and network image resourcesAdvanced MediaGPU Textures

What’s New in Metal, Part 2 Mission Wednesday 11:00AM

Page 43: Working with Wide Color - Apple Inc....File Formats and Color Profiles Use “Display P3” color profile for RGB working space Use 16 bit per channel color mode Use iMac (Late 2015)

Framing the Color Problem

Page 44: Working with Wide Color - Apple Inc....File Formats and Color Profiles Use “Display P3” color profile for RGB working space Use 16 bit per channel color mode Use iMac (Late 2015)

Framing the Color Problem

App Content can come in a broad range of color richness from many sources

Page 45: Working with Wide Color - Apple Inc....File Formats and Color Profiles Use “Display P3” color profile for RGB working space Use 16 bit per channel color mode Use iMac (Late 2015)

Framing the Color Problem

App Content can come in a broad range of color richness from many sourcesDevices and Displays come in a broad range of color capabilities

Page 46: Working with Wide Color - Apple Inc....File Formats and Color Profiles Use “Display P3” color profile for RGB working space Use 16 bit per channel color mode Use iMac (Late 2015)

Framing the Color Problem

App Content can come in a broad range of color richness from many sourcesDevices and Displays come in a broad range of color capabilitiesHow do we bridge the differences?

Page 47: Working with Wide Color - Apple Inc....File Formats and Color Profiles Use “Display P3” color profile for RGB working space Use 16 bit per channel color mode Use iMac (Late 2015)

Solving the Color Problem

Design Tools Deploy

Color Management

Page 48: Working with Wide Color - Apple Inc....File Formats and Color Profiles Use “Display P3” color profile for RGB working space Use 16 bit per channel color mode Use iMac (Late 2015)

Solving the Color Problem

Design Tools Deploy

Color Management

Page 49: Working with Wide Color - Apple Inc....File Formats and Color Profiles Use “Display P3” color profile for RGB working space Use 16 bit per channel color mode Use iMac (Late 2015)

The job of color management is to ensure that an image looks the same on any output device no matter what color space it is encoded in.

Page 50: Working with Wide Color - Apple Inc....File Formats and Color Profiles Use “Display P3” color profile for RGB working space Use 16 bit per channel color mode Use iMac (Late 2015)

How does it work?

Page 51: Working with Wide Color - Apple Inc....File Formats and Color Profiles Use “Display P3” color profile for RGB working space Use 16 bit per channel color mode Use iMac (Late 2015)

Color Management

Page 52: Working with Wide Color - Apple Inc....File Formats and Color Profiles Use “Display P3” color profile for RGB working space Use 16 bit per channel color mode Use iMac (Late 2015)

Color Management

Every image has an associated color space (color profile)

Page 53: Working with Wide Color - Apple Inc....File Formats and Color Profiles Use “Display P3” color profile for RGB working space Use 16 bit per channel color mode Use iMac (Late 2015)

Color Management

Every image has an associated color space (color profile)Color matching maps image colors to output device

Page 54: Working with Wide Color - Apple Inc....File Formats and Color Profiles Use “Display P3” color profile for RGB working space Use 16 bit per channel color mode Use iMac (Late 2015)

Color Management

Every image has an associated color space (color profile)Color matching maps image colors to output deviceNot for free: Every pixel needs to be color matched

Page 55: Working with Wide Color - Apple Inc....File Formats and Color Profiles Use “Display P3” color profile for RGB working space Use 16 bit per channel color mode Use iMac (Late 2015)

Color Management

Every image has an associated color space (color profile)Color matching maps image colors to output deviceNot for free: Every pixel needs to be color matchedPotentially lossy: Color fidelity is lost when output has smaller gamut

Page 56: Working with Wide Color - Apple Inc....File Formats and Color Profiles Use “Display P3” color profile for RGB working space Use 16 bit per channel color mode Use iMac (Late 2015)

Good News!

Page 57: Working with Wide Color - Apple Inc....File Formats and Color Profiles Use “Display P3” color profile for RGB working space Use 16 bit per channel color mode Use iMac (Late 2015)

Color Management

Page 58: Working with Wide Color - Apple Inc....File Formats and Color Profiles Use “Display P3” color profile for RGB working space Use 16 bit per channel color mode Use iMac (Late 2015)

Color Management

Color matching operations are easily hardware accelerated

Page 59: Working with Wide Color - Apple Inc....File Formats and Color Profiles Use “Display P3” color profile for RGB working space Use 16 bit per channel color mode Use iMac (Late 2015)

Color Management

Color matching operations are easily hardware acceleratedWorks automatically via Quartz 2D, ColorSync and Core Animation

Page 60: Working with Wide Color - Apple Inc....File Formats and Color Profiles Use “Display P3” color profile for RGB working space Use 16 bit per channel color mode Use iMac (Late 2015)

Color Management

Color matching operations are easily hardware acceleratedWorks automatically via Quartz 2D, ColorSync and Core AnimationProperly tagged content requires no code to display properly

Page 61: Working with Wide Color - Apple Inc....File Formats and Color Profiles Use “Display P3” color profile for RGB working space Use 16 bit per channel color mode Use iMac (Late 2015)

Platform Color Management

Page 62: Working with Wide Color - Apple Inc....File Formats and Color Profiles Use “Display P3” color profile for RGB working space Use 16 bit per channel color mode Use iMac (Late 2015)

Platform Color Management

macOS has been color managed since its inception!

Page 63: Working with Wide Color - Apple Inc....File Formats and Color Profiles Use “Display P3” color profile for RGB working space Use 16 bit per channel color mode Use iMac (Late 2015)

Platform Color Management

macOS has been color managed since its inception!iOS supports automatic color management on iOS 9.3 and later

NEW

Page 64: Working with Wide Color - Apple Inc....File Formats and Color Profiles Use “Display P3” color profile for RGB working space Use 16 bit per channel color mode Use iMac (Late 2015)

Solving the Color Problem

Color Management

Design Tools Deploy

Page 65: Working with Wide Color - Apple Inc....File Formats and Color Profiles Use “Display P3” color profile for RGB working space Use 16 bit per channel color mode Use iMac (Late 2015)

Design Tools Deploy

Page 66: Working with Wide Color - Apple Inc....File Formats and Color Profiles Use “Display P3” color profile for RGB working space Use 16 bit per channel color mode Use iMac (Late 2015)

Design Tools Deploy

Page 67: Working with Wide Color - Apple Inc....File Formats and Color Profiles Use “Display P3” color profile for RGB working space Use 16 bit per channel color mode Use iMac (Late 2015)

Design Tools DeployDesign

Page 68: Working with Wide Color - Apple Inc....File Formats and Color Profiles Use “Display P3” color profile for RGB working space Use 16 bit per channel color mode Use iMac (Late 2015)

Design

Page 69: Working with Wide Color - Apple Inc....File Formats and Color Profiles Use “Display P3” color profile for RGB working space Use 16 bit per channel color mode Use iMac (Late 2015)

Design Considerations for Wide Gamut

Page 70: Working with Wide Color - Apple Inc....File Formats and Color Profiles Use “Display P3” color profile for RGB working space Use 16 bit per channel color mode Use iMac (Late 2015)

Design Considerations for Wide Gamut

Use wide gamut content where it makes sense

Page 71: Working with Wide Color - Apple Inc....File Formats and Color Profiles Use “Display P3” color profile for RGB working space Use 16 bit per channel color mode Use iMac (Late 2015)

Design Considerations for Wide Gamut

Use wide gamut content where it makes sense Use where vivid colors enhance the user experience

Page 72: Working with Wide Color - Apple Inc....File Formats and Color Profiles Use “Display P3” color profile for RGB working space Use 16 bit per channel color mode Use iMac (Late 2015)

Design Considerations for Wide Gamut

Use wide gamut content where it makes sense Use where vivid colors enhance the user experienceNo need to change all content to P3

Page 73: Working with Wide Color - Apple Inc....File Formats and Color Profiles Use “Display P3” color profile for RGB working space Use 16 bit per channel color mode Use iMac (Late 2015)

Design Considerations for Wide Gamut

Use wide gamut content where it makes sense Use where vivid colors enhance the user experienceNo need to change all content to P3Toolchain support makes gradual opt-in of wide gamut content possible

Page 74: Working with Wide Color - Apple Inc....File Formats and Color Profiles Use “Display P3” color profile for RGB working space Use 16 bit per channel color mode Use iMac (Late 2015)

Upgrading Content to Wide Color

Be careful when promoting an existing design file to wide color!

Page 75: Working with Wide Color - Apple Inc....File Formats and Color Profiles Use “Display P3” color profile for RGB working space Use 16 bit per channel color mode Use iMac (Late 2015)

Upgrading Content to Wide Color

Be careful when promoting an existing design file to wide color! • Don’t “assign” P3 profile

Page 76: Working with Wide Color - Apple Inc....File Formats and Color Profiles Use “Display P3” color profile for RGB working space Use 16 bit per channel color mode Use iMac (Late 2015)

Upgrading Content to Wide Color

Be careful when promoting an existing design file to wide color! • Don’t “assign” P3 profile

Page 77: Working with Wide Color - Apple Inc....File Formats and Color Profiles Use “Display P3” color profile for RGB working space Use 16 bit per channel color mode Use iMac (Late 2015)

Upgrading Content to Wide Color

Be careful when promoting an existing design file to wide color! • Don’t “assign” P3 profile• Convert to P3 instead

Page 78: Working with Wide Color - Apple Inc....File Formats and Color Profiles Use “Display P3” color profile for RGB working space Use 16 bit per channel color mode Use iMac (Late 2015)

File Formats and Color Profiles

Page 79: Working with Wide Color - Apple Inc....File Formats and Color Profiles Use “Display P3” color profile for RGB working space Use 16 bit per channel color mode Use iMac (Late 2015)

File Formats and Color Profiles

Use “Display P3” color profile for RGB working space

Page 80: Working with Wide Color - Apple Inc....File Formats and Color Profiles Use “Display P3” color profile for RGB working space Use 16 bit per channel color mode Use iMac (Late 2015)

File Formats and Color Profiles

Use “Display P3” color profile for RGB working spaceUse 16 bit per channel color mode

Page 81: Working with Wide Color - Apple Inc....File Formats and Color Profiles Use “Display P3” color profile for RGB working space Use 16 bit per channel color mode Use iMac (Late 2015)

File Formats and Color Profiles

Use “Display P3” color profile for RGB working spaceUse 16 bit per channel color modeUse iMac (Late 2015) for accurate preview

Page 82: Working with Wide Color - Apple Inc....File Formats and Color Profiles Use “Display P3” color profile for RGB working space Use 16 bit per channel color mode Use iMac (Late 2015)

File Formats and Color Profiles

Use “Display P3” color profile for RGB working spaceUse 16 bit per channel color modeUse iMac (Late 2015) for accurate previewExport assets as 16bit PNG files with embedded “Display P3” ICC profile

Page 83: Working with Wide Color - Apple Inc....File Formats and Color Profiles Use “Display P3” color profile for RGB working space Use 16 bit per channel color mode Use iMac (Late 2015)

File Formats and Color Profiles

Use “Display P3” color profile for RGB working spaceUse 16 bit per channel color modeUse iMac (Late 2015) for accurate previewExport assets as 16bit PNG files with embedded “Display P3” ICC profileNote: Save for Web and Export Assets do not support wide color!

Page 84: Working with Wide Color - Apple Inc....File Formats and Color Profiles Use “Display P3” color profile for RGB working space Use 16 bit per channel color mode Use iMac (Late 2015)

File Formats and Color Profiles

Use “Display P3” color profile for RGB working spaceUse 16 bit per channel color modeUse iMac (Late 2015) for accurate previewExport assets as 16bit PNG files with embedded “Display P3” ICC profileNote: Save for Web and Export Assets do not support wide color! Use Save As -> PNG format from 16bit source document as a workaround

Page 85: Working with Wide Color - Apple Inc....File Formats and Color Profiles Use “Display P3” color profile for RGB working space Use 16 bit per channel color mode Use iMac (Late 2015)

Solving the Wide Color Problem

Design Tools DeployDesign

Page 86: Working with Wide Color - Apple Inc....File Formats and Color Profiles Use “Display P3” color profile for RGB working space Use 16 bit per channel color mode Use iMac (Late 2015)

Solving the Wide Color Problem

Design Tools DeployDesign Tools

Page 87: Working with Wide Color - Apple Inc....File Formats and Color Profiles Use “Display P3” color profile for RGB working space Use 16 bit per channel color mode Use iMac (Late 2015)

Xcode Asset Catalogs

Page 88: Working with Wide Color - Apple Inc....File Formats and Color Profiles Use “Display P3” color profile for RGB working space Use 16 bit per channel color mode Use iMac (Late 2015)
Page 89: Working with Wide Color - Apple Inc....File Formats and Color Profiles Use “Display P3” color profile for RGB working space Use 16 bit per channel color mode Use iMac (Late 2015)

Asset Catalogs

Page 90: Working with Wide Color - Apple Inc....File Formats and Color Profiles Use “Display P3” color profile for RGB working space Use 16 bit per channel color mode Use iMac (Late 2015)

Asset Catalogs

Best deployment vehicle for static assetsPNG

JPG

Page 91: Working with Wide Color - Apple Inc....File Formats and Color Profiles Use “Display P3” color profile for RGB working space Use 16 bit per channel color mode Use iMac (Late 2015)

Asset Catalogs

Best deployment vehicle for static assets

Automatic color correction

PNG

JPG

Page 92: Working with Wide Color - Apple Inc....File Formats and Color Profiles Use “Display P3” color profile for RGB working space Use 16 bit per channel color mode Use iMac (Late 2015)

Asset Catalogs

Best deployment vehicle for static assets

Automatic color correction

Automatic pixel format optimization

PNG

JPG

Page 93: Working with Wide Color - Apple Inc....File Formats and Color Profiles Use “Display P3” color profile for RGB working space Use 16 bit per channel color mode Use iMac (Late 2015)

Asset Catalogs

Best deployment vehicle for static assets

Automatic color correction

Automatic pixel format optimization

App Slicing

PNG

JPG

Page 94: Working with Wide Color - Apple Inc....File Formats and Color Profiles Use “Display P3” color profile for RGB working space Use 16 bit per channel color mode Use iMac (Late 2015)

Asset Catalog Enhancements NEW

Page 95: Working with Wide Color - Apple Inc....File Formats and Color Profiles Use “Display P3” color profile for RGB working space Use 16 bit per channel color mode Use iMac (Late 2015)

Asset Catalog Enhancements

Support for 16 bit source content

NEW

Page 96: Working with Wide Color - Apple Inc....File Formats and Color Profiles Use “Display P3” color profile for RGB working space Use 16 bit per channel color mode Use iMac (Late 2015)

Asset Catalog Enhancements

Support for 16 bit source contentCataloging by display gamut

NEW

Page 97: Working with Wide Color - Apple Inc....File Formats and Color Profiles Use “Display P3” color profile for RGB working space Use 16 bit per channel color mode Use iMac (Late 2015)

Asset Catalog Enhancements

Support for 16 bit source contentCataloging by display gamut

NEW

Page 98: Working with Wide Color - Apple Inc....File Formats and Color Profiles Use “Display P3” color profile for RGB working space Use 16 bit per channel color mode Use iMac (Late 2015)

Three Easy Choices

Page 99: Working with Wide Color - Apple Inc....File Formats and Color Profiles Use “Display P3” color profile for RGB working space Use 16 bit per channel color mode Use iMac (Late 2015)

Choice #1:

Page 100: Working with Wide Color - Apple Inc....File Formats and Color Profiles Use “Display P3” color profile for RGB working space Use 16 bit per channel color mode Use iMac (Late 2015)

Choice #1: Do Nothing!

Page 101: Working with Wide Color - Apple Inc....File Formats and Color Profiles Use “Display P3” color profile for RGB working space Use 16 bit per channel color mode Use iMac (Late 2015)

No Changes to Asset Catalog

Page 102: Working with Wide Color - Apple Inc....File Formats and Color Profiles Use “Display P3” color profile for RGB working space Use 16 bit per channel color mode Use iMac (Late 2015)

No Changes to Asset Catalog

8 bit sRGB

Page 103: Working with Wide Color - Apple Inc....File Formats and Color Profiles Use “Display P3” color profile for RGB working space Use 16 bit per channel color mode Use iMac (Late 2015)

No Changes to Asset Catalog

Appearance will be preserved

8 bit sRGB

Page 104: Working with Wide Color - Apple Inc....File Formats and Color Profiles Use “Display P3” color profile for RGB working space Use 16 bit per channel color mode Use iMac (Late 2015)

No Changes to Asset Catalog

Appearance will be preserved No wide gamut colors

8 bit sRGB

Page 105: Working with Wide Color - Apple Inc....File Formats and Color Profiles Use “Display P3” color profile for RGB working space Use 16 bit per channel color mode Use iMac (Late 2015)

Choice #2:

Page 106: Working with Wide Color - Apple Inc....File Formats and Color Profiles Use “Display P3” color profile for RGB working space Use 16 bit per channel color mode Use iMac (Late 2015)

Upgrade to P3 Choice #2:

Page 107: Working with Wide Color - Apple Inc....File Formats and Color Profiles Use “Display P3” color profile for RGB working space Use 16 bit per channel color mode Use iMac (Late 2015)

Universal P3 Asset

Page 108: Working with Wide Color - Apple Inc....File Formats and Color Profiles Use “Display P3” color profile for RGB working space Use 16 bit per channel color mode Use iMac (Late 2015)

Universal P3 Asset

Replace existing asset with upgraded asset

16 bit Display P3

Page 109: Working with Wide Color - Apple Inc....File Formats and Color Profiles Use “Display P3” color profile for RGB working space Use 16 bit per channel color mode Use iMac (Late 2015)

Universal P3 Asset

Replace existing asset with upgraded assetAutomatic generation of sRGB derivative

8bit sRGB16 bit Display P3

Page 110: Working with Wide Color - Apple Inc....File Formats and Color Profiles Use “Display P3” color profile for RGB working space Use 16 bit per channel color mode Use iMac (Late 2015)

Universal P3 Asset

Replace existing asset with upgraded assetAutomatic generation of sRGB derivativeHigh quality color match and dither to 8bit

8bit sRGB16 bit Display P3

Page 111: Working with Wide Color - Apple Inc....File Formats and Color Profiles Use “Display P3” color profile for RGB working space Use 16 bit per channel color mode Use iMac (Late 2015)

Universal P3 Asset

Replace existing asset with upgraded assetAutomatic generation of sRGB derivativeHigh quality color match and dither to 8bitContent selected according to display class

Page 112: Working with Wide Color - Apple Inc....File Formats and Color Profiles Use “Display P3” color profile for RGB working space Use 16 bit per channel color mode Use iMac (Late 2015)

Choice #3:

Page 113: Working with Wide Color - Apple Inc....File Formats and Color Profiles Use “Display P3” color profile for RGB working space Use 16 bit per channel color mode Use iMac (Late 2015)

Choice #3: Optimized Assets

Page 114: Working with Wide Color - Apple Inc....File Formats and Color Profiles Use “Display P3” color profile for RGB working space Use 16 bit per channel color mode Use iMac (Late 2015)

Wide Color Optimized Assets

Page 115: Working with Wide Color - Apple Inc....File Formats and Color Profiles Use “Display P3” color profile for RGB working space Use 16 bit per channel color mode Use iMac (Late 2015)

Wide Color Optimized Assets

8 bit sRGB16 bit Display P3

Page 116: Working with Wide Color - Apple Inc....File Formats and Color Profiles Use “Display P3” color profile for RGB working space Use 16 bit per channel color mode Use iMac (Late 2015)

DemoCreating a wide color asset

Page 117: Working with Wide Color - Apple Inc....File Formats and Color Profiles Use “Display P3” color profile for RGB working space Use 16 bit per channel color mode Use iMac (Late 2015)

Design Tools DeployDesign Tools

Page 118: Working with Wide Color - Apple Inc....File Formats and Color Profiles Use “Display P3” color profile for RGB working space Use 16 bit per channel color mode Use iMac (Late 2015)

Design Tools DeployDesign Tools Deploy

Page 119: Working with Wide Color - Apple Inc....File Formats and Color Profiles Use “Display P3” color profile for RGB working space Use 16 bit per channel color mode Use iMac (Late 2015)

Asset Catalog Deployment

Page 120: Working with Wide Color - Apple Inc....File Formats and Color Profiles Use “Display P3” color profile for RGB working space Use 16 bit per channel color mode Use iMac (Late 2015)

Asset Catalog Deployment

App Slicing will ensure that appropriate variant is delivered to a given device

Page 121: Working with Wide Color - Apple Inc....File Formats and Color Profiles Use “Display P3” color profile for RGB working space Use 16 bit per channel color mode Use iMac (Late 2015)

Asset Catalog Deployment

App Slicing will ensure that appropriate variant is delivered to a given deviceNo payload cost for wide gamut content on sRGB devices

Page 122: Working with Wide Color - Apple Inc....File Formats and Color Profiles Use “Display P3” color profile for RGB working space Use 16 bit per channel color mode Use iMac (Late 2015)

Asset Catalog Deployment

NSImage automatically selects best representation for target display

Page 123: Working with Wide Color - Apple Inc....File Formats and Color Profiles Use “Display P3” color profile for RGB working space Use 16 bit per channel color mode Use iMac (Late 2015)

Asset Catalog Deployment

NSImage automatically selects best representation for target displayContent is refreshed when display changesor properties change

Page 124: Working with Wide Color - Apple Inc....File Formats and Color Profiles Use “Display P3” color profile for RGB working space Use 16 bit per channel color mode Use iMac (Late 2015)

Asset Catalog Storage

Page 125: Working with Wide Color - Apple Inc....File Formats and Color Profiles Use “Display P3” color profile for RGB working space Use 16 bit per channel color mode Use iMac (Late 2015)

Asset Catalog Storage

High quality image conversions and efficient storage

Page 126: Working with Wide Color - Apple Inc....File Formats and Color Profiles Use “Display P3” color profile for RGB working space Use 16 bit per channel color mode Use iMac (Late 2015)

Asset Catalog Storage

High quality image conversions and efficient storage16 bit per component storage for wide color content

Page 127: Working with Wide Color - Apple Inc....File Formats and Color Profiles Use “Display P3” color profile for RGB working space Use 16 bit per channel color mode Use iMac (Late 2015)

Asset Catalog Storage

High quality image conversions and efficient storage16 bit per component storage for wide color contentContent dependent image compression

Page 128: Working with Wide Color - Apple Inc....File Formats and Color Profiles Use “Display P3” color profile for RGB working space Use 16 bit per channel color mode Use iMac (Late 2015)

NEWLossy Compression

Page 129: Working with Wide Color - Apple Inc....File Formats and Color Profiles Use “Display P3” color profile for RGB working space Use 16 bit per channel color mode Use iMac (Late 2015)

NEWLossy Compression

Basic compression (JPEG + alpha)

Page 130: Working with Wide Color - Apple Inc....File Formats and Color Profiles Use “Display P3” color profile for RGB working space Use 16 bit per channel color mode Use iMac (Late 2015)

NEWLossy Compression

Basic compression (JPEG + alpha) Excellent performance across all devices

Page 131: Working with Wide Color - Apple Inc....File Formats and Color Profiles Use “Display P3” color profile for RGB working space Use 16 bit per channel color mode Use iMac (Late 2015)

GPU Compression (ASTC)

Advanced Scalable Texture Compression

NEW

Page 132: Working with Wide Color - Apple Inc....File Formats and Color Profiles Use “Display P3” color profile for RGB working space Use 16 bit per channel color mode Use iMac (Late 2015)

GPU Compression (ASTC)

Advanced Scalable Texture Compression• Optimize for best quality or smallest size

(4bpp or 1bpp)

NEW

Page 133: Working with Wide Color - Apple Inc....File Formats and Color Profiles Use “Display P3” color profile for RGB working space Use 16 bit per channel color mode Use iMac (Late 2015)

GPU Compression (ASTC)

Advanced Scalable Texture Compression• Optimize for best quality or smallest size

(4bpp or 1bpp)

NEW

Page 134: Working with Wide Color - Apple Inc....File Formats and Color Profiles Use “Display P3” color profile for RGB working space Use 16 bit per channel color mode Use iMac (Late 2015)

GPU Compression (ASTC)

Advanced Scalable Texture Compression• Optimize for best quality or smallest size

(4bpp or 1bpp)• Automatic software fallback for devices

lacking ASTC graphics capability

NEW

Page 135: Working with Wide Color - Apple Inc....File Formats and Color Profiles Use “Display P3” color profile for RGB working space Use 16 bit per channel color mode Use iMac (Late 2015)

GPU Compression and Wide Color Assets

GPU compression uses ASTC LDRtexture compression

Page 136: Working with Wide Color - Apple Inc....File Formats and Color Profiles Use “Display P3” color profile for RGB working space Use 16 bit per channel color mode Use iMac (Late 2015)

GPU Compression and Wide Color Assets

GPU compression uses ASTC LDRtexture compression Wide content needs to be reduced to 8bits before compression

Page 137: Working with Wide Color - Apple Inc....File Formats and Color Profiles Use “Display P3” color profile for RGB working space Use 16 bit per channel color mode Use iMac (Late 2015)

GPU Compression and Wide Color Assets

GPU compression uses ASTC LDRtexture compression Wide content needs to be reduced to 8bits before compressionXcode performs a high quality dither automatically

Page 138: Working with Wide Color - Apple Inc....File Formats and Color Profiles Use “Display P3” color profile for RGB working space Use 16 bit per channel color mode Use iMac (Late 2015)

GPU Compression and Wide Color Assets

GPU compression uses ASTC LDRtexture compression Wide content needs to be reduced to 8bits before compressionXcode performs a high quality dither automaticallyWide gamut colors preserved by encoding in Display P3 color space

Page 139: Working with Wide Color - Apple Inc....File Formats and Color Profiles Use “Display P3” color profile for RGB working space Use 16 bit per channel color mode Use iMac (Late 2015)

Design Tools Deploy

Page 140: Working with Wide Color - Apple Inc....File Formats and Color Profiles Use “Display P3” color profile for RGB working space Use 16 bit per channel color mode Use iMac (Late 2015)

What about Colors?

Page 141: Working with Wide Color - Apple Inc....File Formats and Color Profiles Use “Display P3” color profile for RGB working space Use 16 bit per channel color mode Use iMac (Late 2015)

Colors in UI

Page 142: Working with Wide Color - Apple Inc....File Formats and Color Profiles Use “Display P3” color profile for RGB working space Use 16 bit per channel color mode Use iMac (Late 2015)

Colors in UI

Most pixels on screen are solid colors

Page 143: Working with Wide Color - Apple Inc....File Formats and Color Profiles Use “Display P3” color profile for RGB working space Use 16 bit per channel color mode Use iMac (Late 2015)

Colors in UI

Most pixels on screen are solid colors Wide gamut colors present new challenges

Page 144: Working with Wide Color - Apple Inc....File Formats and Color Profiles Use “Display P3” color profile for RGB working space Use 16 bit per channel color mode Use iMac (Late 2015)

Talking Colors

Page 145: Working with Wide Color - Apple Inc....File Formats and Color Profiles Use “Display P3” color profile for RGB working space Use 16 bit per channel color mode Use iMac (Late 2015)

Color Specification

Page 146: Working with Wide Color - Apple Inc....File Formats and Color Profiles Use “Display P3” color profile for RGB working space Use 16 bit per channel color mode Use iMac (Late 2015)

Color Specification

Colors are usually communicated with an assumed sRGB color space

Page 147: Working with Wide Color - Apple Inc....File Formats and Color Profiles Use “Display P3” color profile for RGB working space Use 16 bit per channel color mode Use iMac (Late 2015)

Color Specification

Colors are usually communicated with an assumed sRGB color spaceRGB (128, 45, 56)#FF0456

Page 148: Working with Wide Color - Apple Inc....File Formats and Color Profiles Use “Display P3” color profile for RGB working space Use 16 bit per channel color mode Use iMac (Late 2015)

This is no longer sufficient for Wide Gamut colors

Page 149: Working with Wide Color - Apple Inc....File Formats and Color Profiles Use “Display P3” color profile for RGB working space Use 16 bit per channel color mode Use iMac (Late 2015)

Color Specification

Be specific about color space!

Page 150: Working with Wide Color - Apple Inc....File Formats and Color Profiles Use “Display P3” color profile for RGB working space Use 16 bit per channel color mode Use iMac (Late 2015)

Color Specification

Be specific about color space!Use Display P3 instead of sRGB when working with wide gamut designs

Page 151: Working with Wide Color - Apple Inc....File Formats and Color Profiles Use “Display P3” color profile for RGB working space Use 16 bit per channel color mode Use iMac (Late 2015)

Color Specification

Be specific about color space!Use Display P3 instead of sRGB when working with wide gamut designsUse floating point for more precision

Page 152: Working with Wide Color - Apple Inc....File Formats and Color Profiles Use “Display P3” color profile for RGB working space Use 16 bit per channel color mode Use iMac (Late 2015)

Color Specification

Be specific about color space!Use Display P3 instead of sRGB when working with wide gamut designsUse floating point for more precision P3 (255, 128, 191) P3 (1.0, 0.5, 0.75)

Page 153: Working with Wide Color - Apple Inc....File Formats and Color Profiles Use “Display P3” color profile for RGB working space Use 16 bit per channel color mode Use iMac (Late 2015)

Picking Colors

Page 154: Working with Wide Color - Apple Inc....File Formats and Color Profiles Use “Display P3” color profile for RGB working space Use 16 bit per channel color mode Use iMac (Late 2015)
Page 155: Working with Wide Color - Apple Inc....File Formats and Color Profiles Use “Display P3” color profile for RGB working space Use 16 bit per channel color mode Use iMac (Late 2015)

NEW

Page 156: Working with Wide Color - Apple Inc....File Formats and Color Profiles Use “Display P3” color profile for RGB working space Use 16 bit per channel color mode Use iMac (Late 2015)

NEW

Page 157: Working with Wide Color - Apple Inc....File Formats and Color Profiles Use “Display P3” color profile for RGB working space Use 16 bit per channel color mode Use iMac (Late 2015)

NEW

Page 158: Working with Wide Color - Apple Inc....File Formats and Color Profiles Use “Display P3” color profile for RGB working space Use 16 bit per channel color mode Use iMac (Late 2015)

NEW

Page 159: Working with Wide Color - Apple Inc....File Formats and Color Profiles Use “Display P3” color profile for RGB working space Use 16 bit per channel color mode Use iMac (Late 2015)

NEW

Page 160: Working with Wide Color - Apple Inc....File Formats and Color Profiles Use “Display P3” color profile for RGB working space Use 16 bit per channel color mode Use iMac (Late 2015)

NEW

Page 161: Working with Wide Color - Apple Inc....File Formats and Color Profiles Use “Display P3” color profile for RGB working space Use 16 bit per channel color mode Use iMac (Late 2015)

Coding Colors

Page 162: Working with Wide Color - Apple Inc....File Formats and Color Profiles Use “Display P3” color profile for RGB working space Use 16 bit per channel color mode Use iMac (Late 2015)

Constructing Wide Gamut Colors NEW

Page 163: Working with Wide Color - Apple Inc....File Formats and Color Profiles Use “Display P3” color profile for RGB working space Use 16 bit per channel color mode Use iMac (Late 2015)

Constructing Wide Gamut Colors

NSColor(displayP3Red: 1.0, green: 0.0, blue: 0.0, alpha: 1.0)

UIColor(displayP3Red: 1.0, green: 0.0, blue: 0.0, alpha: 1.0)

NEW

Page 164: Working with Wide Color - Apple Inc....File Formats and Color Profiles Use “Display P3” color profile for RGB working space Use 16 bit per channel color mode Use iMac (Late 2015)

Constructing Extended Range sRGB Colors

NEW

Page 165: Working with Wide Color - Apple Inc....File Formats and Color Profiles Use “Display P3” color profile for RGB working space Use 16 bit per channel color mode Use iMac (Late 2015)

Constructing Extended Range sRGB ColorsNSColor(red: 1.1, green: -.25, blue: 0.0, alpha: 1.0)

UIColor(red: 1.1, green: -.25, blue: 0.0, alpha: 1.0)

NEW

Page 166: Working with Wide Color - Apple Inc....File Formats and Color Profiles Use “Display P3” color profile for RGB working space Use 16 bit per channel color mode Use iMac (Late 2015)

Storing Colors

Page 167: Working with Wide Color - Apple Inc....File Formats and Color Profiles Use “Display P3” color profile for RGB working space Use 16 bit per channel color mode Use iMac (Late 2015)

Special care needs to be taken when storing wide gamut colors in document data

Focus: Archiving Colors

Page 168: Working with Wide Color - Apple Inc....File Formats and Color Profiles Use “Display P3” color profile for RGB working space Use 16 bit per channel color mode Use iMac (Late 2015)

Special care needs to be taken when storing wide gamut colors in document data Beware of assumed color spaces!

Focus: Archiving Colors

Page 169: Working with Wide Color - Apple Inc....File Formats and Color Profiles Use “Display P3” color profile for RGB working space Use 16 bit per channel color mode Use iMac (Late 2015)

Special care needs to be taken when storing wide gamut colors in document data Beware of assumed color spaces!Consider encoding “compatible” sRGB color alongside new wide gamut colors

Focus: Archiving Colors

Page 170: Working with Wide Color - Apple Inc....File Formats and Color Profiles Use “Display P3” color profile for RGB working space Use 16 bit per channel color mode Use iMac (Late 2015)

Special care needs to be taken when storing wide gamut colors in document data Beware of assumed color spaces!Consider encoding “compatible” sRGB color alongside new wide gamut colorsiOS: Use CGColor.convert() API to convert colors to sRGB

Focus: Archiving Colors

Page 171: Working with Wide Color - Apple Inc....File Formats and Color Profiles Use “Display P3” color profile for RGB working space Use 16 bit per channel color mode Use iMac (Late 2015)

Special care needs to be taken when storing wide gamut colors in document data Beware of assumed color spaces!Consider encoding “compatible” sRGB color alongside new wide gamut colorsiOS: Use CGColor.convert() API to convert colors to sRGBmacOS: Use NSColor.usingColorSpace() API to convert colors to sRGB

Focus: Archiving Colors

Page 172: Working with Wide Color - Apple Inc....File Formats and Color Profiles Use “Display P3” color profile for RGB working space Use 16 bit per channel color mode Use iMac (Late 2015)

Case Study: RTF / TextEdit

Page 173: Working with Wide Color - Apple Inc....File Formats and Color Profiles Use “Display P3” color profile for RGB working space Use 16 bit per channel color mode Use iMac (Late 2015)

Existing

{\colortbl;\red0\green0\blue255;\red0\green128\blue255;\red255\green14\blue12;}

Case Study: RTF / TextEdit

Page 174: Working with Wide Color - Apple Inc....File Formats and Color Profiles Use “Display P3” color profile for RGB working space Use 16 bit per channel color mode Use iMac (Late 2015)

Existing

{\colortbl;\red0\green0\blue255;\red0\green128\blue255;\red255\green14\blue12;}

Case Study: RTF / TextEdit

Page 175: Working with Wide Color - Apple Inc....File Formats and Color Profiles Use “Display P3” color profile for RGB working space Use 16 bit per channel color mode Use iMac (Late 2015)

Existing

{\colortbl;\red0\green0\blue255;\red0\green128\blue255;\red255\green14\blue12;}

New

{\*\expandedcolortbl;\cssrgb\c50000\c100000\c0;\cspthree\c100000\c50000\c0;\cssrgb\c-20000\c140000\c0;}

Case Study: RTF / TextEdit

Page 176: Working with Wide Color - Apple Inc....File Formats and Color Profiles Use “Display P3” color profile for RGB working space Use 16 bit per channel color mode Use iMac (Late 2015)

Existing

{\colortbl;\red0\green0\blue255;\red0\green128\blue255;\red255\green14\blue12;}

New

{\*\expandedcolortbl;\cssrgb\c50000\c100000\c0;\cspthree\c100000\c50000\c0;\cssrgb\c-20000\c140000\c0;}

Case Study: RTF / TextEdit

Page 177: Working with Wide Color - Apple Inc....File Formats and Color Profiles Use “Display P3” color profile for RGB working space Use 16 bit per channel color mode Use iMac (Late 2015)

Surfing with Colors

Page 178: Working with Wide Color - Apple Inc....File Formats and Color Profiles Use “Display P3” color profile for RGB working space Use 16 bit per channel color mode Use iMac (Late 2015)

Colors in the Web

All tagged images are color matched

Page 179: Working with Wide Color - Apple Inc....File Formats and Color Profiles Use “Display P3” color profile for RGB working space Use 16 bit per channel color mode Use iMac (Late 2015)

Colors in the Web

All tagged images are color matchedMedia Queries to resolve assets between P3 and sRGB capable devices

<picture>

    <source srcset=“flower-p3.jpg" media=“(color-gamut: p3)">

    <source srcset=“flower-rgb.jpg">

</picture>

Page 180: Working with Wide Color - Apple Inc....File Formats and Color Profiles Use “Display P3” color profile for RGB working space Use 16 bit per channel color mode Use iMac (Late 2015)

Colors in the Web

All tagged images are color matchedMedia Queries to resolve assets between P3 and sRGB capable devices

<picture>

    <source srcset=“flower-p3.jpg" media=“(color-gamut: p3)">

    <source srcset=“flower-rgb.jpg">

</picture>

WebKit proposal for CSS colors in other color spaces

Page 181: Working with Wide Color - Apple Inc....File Formats and Color Profiles Use “Display P3” color profile for RGB working space Use 16 bit per channel color mode Use iMac (Late 2015)

Optimizing your app’s drawing for wide gamut displaysWide Gamut Rendering

Steve Holt UIKit

Page 182: Working with Wide Color - Apple Inc....File Formats and Color Profiles Use “Display P3” color profile for RGB working space Use 16 bit per channel color mode Use iMac (Late 2015)

Drawing with Wide Color

Page 183: Working with Wide Color - Apple Inc....File Formats and Color Profiles Use “Display P3” color profile for RGB working space Use 16 bit per channel color mode Use iMac (Late 2015)

Drawing with Wide Color

(Output simulated)

Page 184: Working with Wide Color - Apple Inc....File Formats and Color Profiles Use “Display P3” color profile for RGB working space Use 16 bit per channel color mode Use iMac (Late 2015)

CocoaDrawing with Wide Color

Page 185: Working with Wide Color - Apple Inc....File Formats and Color Profiles Use “Display P3” color profile for RGB working space Use 16 bit per channel color mode Use iMac (Late 2015)

CocoaDrawing with Wide Color

NSImage.init(size: NSSize, flipped drawingHandlerShouldBeCalledWithFlippedContext: Bool,

drawingHandler: (NSRect) -> Bool)

Page 186: Working with Wide Color - Apple Inc....File Formats and Color Profiles Use “Display P3” color profile for RGB working space Use 16 bit per channel color mode Use iMac (Late 2015)

CocoaDrawing with Wide Color

NSImage.init(size: NSSize, flipped drawingHandlerShouldBeCalledWithFlippedContext: Bool,

drawingHandler: (NSRect) -> Bool)

• DrawingHandler called with current NSGraphicsContext instance

Page 187: Working with Wide Color - Apple Inc....File Formats and Color Profiles Use “Display P3” color profile for RGB working space Use 16 bit per channel color mode Use iMac (Late 2015)

CocoaDrawing with Wide Color

NSImage.init(size: NSSize, flipped drawingHandlerShouldBeCalledWithFlippedContext: Bool,

drawingHandler: (NSRect) -> Bool)

• DrawingHandler called with current NSGraphicsContext instance• Use anywhere you would NSImage

Page 188: Working with Wide Color - Apple Inc....File Formats and Color Profiles Use “Display P3” color profile for RGB working space Use 16 bit per channel color mode Use iMac (Late 2015)

// Drawing with Wide Color

// Cocoa

import Cocoa

let size = CGSize(width: 250, height: 250)

let image = NSImage(size: size, flipped: false) { drawRect -> Bool in

let rects = drawRect.divide(drawRect.size.width/2, fromEdge: .minXEdge)

NSColor(displayP3Red: 1.0, green: 0.0, blue: 0.0, alpha: 1.0).set()

NSBezierPath(rect: rects.slice).fill()

NSColor(red: 1.0, green: 0.0, blue: 0.0, alpha: 1.0).set()

NSBezierPath(rect: rects.remainder).fill()

return true

}

Page 189: Working with Wide Color - Apple Inc....File Formats and Color Profiles Use “Display P3” color profile for RGB working space Use 16 bit per channel color mode Use iMac (Late 2015)

// Drawing with Wide Color

// Cocoa

import Cocoa

let size = CGSize(width: 250, height: 250)

let image = NSImage(size: size, flipped: false) { drawRect -> Bool in

let rects = drawRect.divide(drawRect.size.width/2, fromEdge: .minXEdge)

NSColor(displayP3Red: 1.0, green: 0.0, blue: 0.0, alpha: 1.0).set()

NSBezierPath(rect: rects.slice).fill()

NSColor(red: 1.0, green: 0.0, blue: 0.0, alpha: 1.0).set()

NSBezierPath(rect: rects.remainder).fill()

return true

}

Page 190: Working with Wide Color - Apple Inc....File Formats and Color Profiles Use “Display P3” color profile for RGB working space Use 16 bit per channel color mode Use iMac (Late 2015)

// Drawing with Wide Color

// Cocoa

import Cocoa

let size = CGSize(width: 250, height: 250)

let image = NSImage(size: size, flipped: false) { drawRect -> Bool in

let rects = drawRect.divide(drawRect.size.width/2, fromEdge: .minXEdge)

NSColor(displayP3Red: 1.0, green: 0.0, blue: 0.0, alpha: 1.0).set()

NSBezierPath(rect: rects.slice).fill()

NSColor(red: 1.0, green: 0.0, blue: 0.0, alpha: 1.0).set()

NSBezierPath(rect: rects.remainder).fill()

return true

}

Page 191: Working with Wide Color - Apple Inc....File Formats and Color Profiles Use “Display P3” color profile for RGB working space Use 16 bit per channel color mode Use iMac (Late 2015)

// Drawing with Wide Color

// Cocoa

import Cocoa

let size = CGSize(width: 250, height: 250)

let image = NSImage(size: size, flipped: false) { drawRect -> Bool in

let rects = drawRect.divide(drawRect.size.width/2, fromEdge: .minXEdge)

NSColor(displayP3Red: 1.0, green: 0.0, blue: 0.0, alpha: 1.0).set()

NSBezierPath(rect: rects.slice).fill()

NSColor(red: 1.0, green: 0.0, blue: 0.0, alpha: 1.0).set()

NSBezierPath(rect: rects.remainder).fill()

return true

}

Page 192: Working with Wide Color - Apple Inc....File Formats and Color Profiles Use “Display P3” color profile for RGB working space Use 16 bit per channel color mode Use iMac (Late 2015)

// Drawing with Wide Color

// Cocoa

import Cocoa

let size = CGSize(width: 250, height: 250)

let image = NSImage(size: size, flipped: false) { drawRect -> Bool in

let rects = drawRect.divide(drawRect.size.width/2, fromEdge: .minXEdge)

NSColor(displayP3Red: 1.0, green: 0.0, blue: 0.0, alpha: 1.0).set()

NSBezierPath(rect: rects.slice).fill()

NSColor(red: 1.0, green: 0.0, blue: 0.0, alpha: 1.0).set()

NSBezierPath(rect: rects.remainder).fill()

return true

}

Page 193: Working with Wide Color - Apple Inc....File Formats and Color Profiles Use “Display P3” color profile for RGB working space Use 16 bit per channel color mode Use iMac (Late 2015)

CocoaDrawing with Wide Color

(Output simulated)

Page 194: Working with Wide Color - Apple Inc....File Formats and Color Profiles Use “Display P3” color profile for RGB working space Use 16 bit per channel color mode Use iMac (Late 2015)

CocoaTouchDrawing with Wide Color

UIGraphicsBeginImageContext(_ size: CGSize)

Page 195: Working with Wide Color - Apple Inc....File Formats and Color Profiles Use “Display P3” color profile for RGB working space Use 16 bit per channel color mode Use iMac (Late 2015)

// Drawing with Wide Color

// CocoaTouch

import UIKit

let size = CGSize(width: 250, height: 250)

UIGraphicsBeginImageContext(size)

let rects = CGRect(origin: .zero, size: size).divide(size.width/2, fromEdge: .minXEdge)

UIColor(displayP3Red: 1.0, green: 0.0, blue: 0.0, alpha: 1.0).set()

UIRectFill(rects.slice)

UIColor.red().set()

UIRectFill(rects.remainder)

let image = UIGraphicsGetImageFromCurrentImageContext()

UIGraphicsEndImageContext()

Page 196: Working with Wide Color - Apple Inc....File Formats and Color Profiles Use “Display P3” color profile for RGB working space Use 16 bit per channel color mode Use iMac (Late 2015)

// Drawing with Wide Color

// CocoaTouch

import UIKit

let size = CGSize(width: 250, height: 250)

UIGraphicsBeginImageContext(size)

let rects = CGRect(origin: .zero, size: size).divide(size.width/2, fromEdge: .minXEdge)

UIColor(displayP3Red: 1.0, green: 0.0, blue: 0.0, alpha: 1.0).set()

UIRectFill(rects.slice)

UIColor.red().set()

UIRectFill(rects.remainder)

let image = UIGraphicsGetImageFromCurrentImageContext()

UIGraphicsEndImageContext()

Page 197: Working with Wide Color - Apple Inc....File Formats and Color Profiles Use “Display P3” color profile for RGB working space Use 16 bit per channel color mode Use iMac (Late 2015)

// Drawing with Wide Color

// CocoaTouch

import UIKit

let size = CGSize(width: 250, height: 250)

UIGraphicsBeginImageContext(size)

let rects = CGRect(origin: .zero, size: size).divide(size.width/2, fromEdge: .minXEdge)

UIColor(displayP3Red: 1.0, green: 0.0, blue: 0.0, alpha: 1.0).set()

UIRectFill(rects.slice)

UIColor.red().set()

UIRectFill(rects.remainder)

let image = UIGraphicsGetImageFromCurrentImageContext()

UIGraphicsEndImageContext()

Page 198: Working with Wide Color - Apple Inc....File Formats and Color Profiles Use “Display P3” color profile for RGB working space Use 16 bit per channel color mode Use iMac (Late 2015)

// Drawing with Wide Color

// CocoaTouch

import UIKit

let size = CGSize(width: 250, height: 250)

UIGraphicsBeginImageContext(size)

let rects = CGRect(origin: .zero, size: size).divide(size.width/2, fromEdge: .minXEdge)

UIColor(displayP3Red: 1.0, green: 0.0, blue: 0.0, alpha: 1.0).set()

UIRectFill(rects.slice)

UIColor.red().set()

UIRectFill(rects.remainder)

let image = UIGraphicsGetImageFromCurrentImageContext()

UIGraphicsEndImageContext()

Page 199: Working with Wide Color - Apple Inc....File Formats and Color Profiles Use “Display P3” color profile for RGB working space Use 16 bit per channel color mode Use iMac (Late 2015)

// Drawing with Wide Color

// CocoaTouch

import UIKit

let size = CGSize(width: 250, height: 250)

UIGraphicsBeginImageContext(size)

let rects = CGRect(origin: .zero, size: size).divide(size.width/2, fromEdge: .minXEdge)

UIColor(displayP3Red: 1.0, green: 0.0, blue: 0.0, alpha: 1.0).set()

UIRectFill(rects.slice)

UIColor.red().set()

UIRectFill(rects.remainder)

let image = UIGraphicsGetImageFromCurrentImageContext()

UIGraphicsEndImageContext()

Page 200: Working with Wide Color - Apple Inc....File Formats and Color Profiles Use “Display P3” color profile for RGB working space Use 16 bit per channel color mode Use iMac (Late 2015)

// Drawing with Wide Color

// CocoaTouch

import UIKit

let size = CGSize(width: 250, height: 250)

UIGraphicsBeginImageContext(size)

let rects = CGRect(origin: .zero, size: size).divide(size.width/2, fromEdge: .minXEdge)

UIColor(displayP3Red: 1.0, green: 0.0, blue: 0.0, alpha: 1.0).set()

UIRectFill(rects.slice)

UIColor.red().set()

UIRectFill(rects.remainder)

let image = UIGraphicsGetImageFromCurrentImageContext()

UIGraphicsEndImageContext()

Page 201: Working with Wide Color - Apple Inc....File Formats and Color Profiles Use “Display P3” color profile for RGB working space Use 16 bit per channel color mode Use iMac (Late 2015)

// Drawing with Wide Color

// CocoaTouch

import UIKit

let size = CGSize(width: 250, height: 250)

UIGraphicsBeginImageContext(size)

let rects = CGRect(origin: .zero, size: size).divide(size.width/2, fromEdge: .minXEdge)

UIColor(displayP3Red: 1.0, green: 0.0, blue: 0.0, alpha: 1.0).set()

UIRectFill(rects.slice)

UIColor.red().set()

UIRectFill(rects.remainder)

let image = UIGraphicsGetImageFromCurrentImageContext()

UIGraphicsEndImageContext()

Page 202: Working with Wide Color - Apple Inc....File Formats and Color Profiles Use “Display P3” color profile for RGB working space Use 16 bit per channel color mode Use iMac (Late 2015)

CocoaTouchDrawing with Wide Color

(Output simulated)

Page 203: Working with Wide Color - Apple Inc....File Formats and Color Profiles Use “Display P3” color profile for RGB working space Use 16 bit per channel color mode Use iMac (Late 2015)

“The format for the bitmap is a ARGB 32-bit integer pixel format using host-byte order.”

From the UIKit Function Reference

Page 204: Working with Wide Color - Apple Inc....File Formats and Color Profiles Use “Display P3” color profile for RGB working space Use 16 bit per channel color mode Use iMac (Late 2015)

CocoaTouchDrawing with Wide Color

UIGraphicsBeginImageContext(_ size: CGSize)

Page 205: Working with Wide Color - Apple Inc....File Formats and Color Profiles Use “Display P3” color profile for RGB working space Use 16 bit per channel color mode Use iMac (Late 2015)

CocoaTouchDrawing with Wide Color

UIGraphicsBeginImageContext(_ size: CGSize)

• Cannot create contexts with more than 8 bits per color channel

Page 206: Working with Wide Color - Apple Inc....File Formats and Color Profiles Use “Display P3” color profile for RGB working space Use 16 bit per channel color mode Use iMac (Late 2015)

CocoaTouchDrawing with Wide Color

UIGraphicsBeginImageContext(_ size: CGSize)

• Cannot create contexts with more than 8 bits per color channel• Cannot represent colors in extended range sRGB

Page 207: Working with Wide Color - Apple Inc....File Formats and Color Profiles Use “Display P3” color profile for RGB working space Use 16 bit per channel color mode Use iMac (Late 2015)

CocoaTouchDrawing with Wide Color

UIGraphicsBeginImageContext(_ size: CGSize)

• Cannot create contexts with more than 8 bits per color channel• Cannot represent colors in extended range sRGB• Existing interface has no ability to create a context in non-sRGB color space

- UIGraphicsBeginImageContextWithOptions(_ size: CGSize, _ opaque: Bool, _ scale: CGFloat)

Page 208: Working with Wide Color - Apple Inc....File Formats and Color Profiles Use “Display P3” color profile for RGB working space Use 16 bit per channel color mode Use iMac (Late 2015)

CocoaTouchDrawing with Wide Color

UIGraphicsImageRenderer(size: CGSize)

NEW

Page 209: Working with Wide Color - Apple Inc....File Formats and Color Profiles Use “Display P3” color profile for RGB working space Use 16 bit per channel color mode Use iMac (Late 2015)

// Drawing with Wide Color

// CocoaTouch

import UIKit

let renderer = UIGraphicsImageRenderer(size: CGSize(width: 250, height: 250))

let image = renderer.image { rendererContext in

let bounds = rendererContext.format.bounds

let rects = bounds.divide(bounds.size.width/2, fromEdge: .minXEdge)

UIColor(displayP3Red: 1.0, green: 0.0, blue: 0.0, alpha: 1.0).set()

rendererContext.fill(rects.slice)

UIColor(red: 1.0, green: 0.0, blue: 0.0, alpha: 1.0).set()

rendererContext.fill(rects.remainder)

}

Page 210: Working with Wide Color - Apple Inc....File Formats and Color Profiles Use “Display P3” color profile for RGB working space Use 16 bit per channel color mode Use iMac (Late 2015)

// Drawing with Wide Color

// CocoaTouch

import UIKit

let renderer = UIGraphicsImageRenderer(size: CGSize(width: 250, height: 250))

let image = renderer.image { rendererContext in

let bounds = rendererContext.format.bounds

let rects = bounds.divide(bounds.size.width/2, fromEdge: .minXEdge)

UIColor(displayP3Red: 1.0, green: 0.0, blue: 0.0, alpha: 1.0).set()

rendererContext.fill(rects.slice)

UIColor(red: 1.0, green: 0.0, blue: 0.0, alpha: 1.0).set()

rendererContext.fill(rects.remainder)

}

Page 211: Working with Wide Color - Apple Inc....File Formats and Color Profiles Use “Display P3” color profile for RGB working space Use 16 bit per channel color mode Use iMac (Late 2015)

// Drawing with Wide Color

// CocoaTouch

import UIKit

let renderer = UIGraphicsImageRenderer(size: CGSize(width: 250, height: 250))

let image = renderer.image { rendererContext in

let bounds = rendererContext.format.bounds

let rects = bounds.divide(bounds.size.width/2, fromEdge: .minXEdge)

UIColor(displayP3Red: 1.0, green: 0.0, blue: 0.0, alpha: 1.0).set()

rendererContext.fill(rects.slice)

UIColor(red: 1.0, green: 0.0, blue: 0.0, alpha: 1.0).set()

rendererContext.fill(rects.remainder)

}

Page 212: Working with Wide Color - Apple Inc....File Formats and Color Profiles Use “Display P3” color profile for RGB working space Use 16 bit per channel color mode Use iMac (Late 2015)

// Drawing with Wide Color

// CocoaTouch

import UIKit

let renderer = UIGraphicsImageRenderer(size: CGSize(width: 250, height: 250))

let image = renderer.image { rendererContext in

let bounds = rendererContext.format.bounds

let rects = bounds.divide(bounds.size.width/2, fromEdge: .minXEdge)

UIColor(displayP3Red: 1.0, green: 0.0, blue: 0.0, alpha: 1.0).set()

rendererContext.fill(rects.slice)

UIColor(red: 1.0, green: 0.0, blue: 0.0, alpha: 1.0).set()

rendererContext.fill(rects.remainder)

}

Page 213: Working with Wide Color - Apple Inc....File Formats and Color Profiles Use “Display P3” color profile for RGB working space Use 16 bit per channel color mode Use iMac (Late 2015)

// Drawing with Wide Color

// CocoaTouch

import UIKit

let renderer = UIGraphicsImageRenderer(size: CGSize(width: 250, height: 250))

let image = renderer.image { rendererContext in

let bounds = rendererContext.format.bounds

let rects = bounds.divide(bounds.size.width/2, fromEdge: .minXEdge)

UIColor(displayP3Red: 1.0, green: 0.0, blue: 0.0, alpha: 1.0).set()

rendererContext.fill(rects.slice)

UIColor(red: 1.0, green: 0.0, blue: 0.0, alpha: 1.0).set()

rendererContext.fill(rects.remainder)

}

Page 214: Working with Wide Color - Apple Inc....File Formats and Color Profiles Use “Display P3” color profile for RGB working space Use 16 bit per channel color mode Use iMac (Late 2015)

// Drawing with Wide Color

// CocoaTouch

import UIKit

let renderer = UIGraphicsImageRenderer(size: CGSize(width: 250, height: 250))

let image = renderer.image { rendererContext in

let bounds = rendererContext.format.bounds

let rects = bounds.divide(bounds.size.width/2, fromEdge: .minXEdge)

UIColor(displayP3Red: 1.0, green: 0.0, blue: 0.0, alpha: 1.0).set()

rendererContext.fill(rects.slice)

UIColor(red: 1.0, green: 0.0, blue: 0.0, alpha: 1.0).set()

rendererContext.fill(rects.remainder)

}

Page 215: Working with Wide Color - Apple Inc....File Formats and Color Profiles Use “Display P3” color profile for RGB working space Use 16 bit per channel color mode Use iMac (Late 2015)

CocoaDrawing with Wide Color

(Output simulated)

Page 216: Working with Wide Color - Apple Inc....File Formats and Color Profiles Use “Display P3” color profile for RGB working space Use 16 bit per channel color mode Use iMac (Late 2015)

CocoaTouchDrawing with Wide Color

Page 217: Working with Wide Color - Apple Inc....File Formats and Color Profiles Use “Display P3” color profile for RGB working space Use 16 bit per channel color mode Use iMac (Late 2015)

CocoaTouchDrawing with Wide Color

UIGraphicsImageRenderer(size: CGSize)

Page 218: Working with Wide Color - Apple Inc....File Formats and Color Profiles Use “Display P3” color profile for RGB working space Use 16 bit per channel color mode Use iMac (Late 2015)

CocoaTouchDrawing with Wide Color

UIGraphicsImageRenderer(size: CGSize)

• Fully color managed by default

Page 219: Working with Wide Color - Apple Inc....File Formats and Color Profiles Use “Display P3” color profile for RGB working space Use 16 bit per channel color mode Use iMac (Late 2015)

CocoaTouchDrawing with Wide Color

UIGraphicsImageRenderer(size: CGSize)

• Fully color managed by default• Supports extended range sRGB color space

Page 220: Working with Wide Color - Apple Inc....File Formats and Color Profiles Use “Display P3” color profile for RGB working space Use 16 bit per channel color mode Use iMac (Late 2015)

CocoaTouchDrawing with Wide Color

UIGraphicsImageRenderer(size: CGSize)

• Fully color managed by default• Supports extended range sRGB color space• Manages CGContext lifetime

Page 221: Working with Wide Color - Apple Inc....File Formats and Color Profiles Use “Display P3” color profile for RGB working space Use 16 bit per channel color mode Use iMac (Late 2015)

CocoaTouchDrawing with Wide Color

UIGraphicsImageRenderer(size: CGSize)

• Fully color managed by default• Supports extended range sRGB color space• Manages CGContext lifetime• Works with your existing code using UIGraphicsGetCurrentContext()

Page 222: Working with Wide Color - Apple Inc....File Formats and Color Profiles Use “Display P3” color profile for RGB working space Use 16 bit per channel color mode Use iMac (Late 2015)

Wide Color on the Screen

Page 223: Working with Wide Color - Apple Inc....File Formats and Color Profiles Use “Display P3” color profile for RGB working space Use 16 bit per channel color mode Use iMac (Late 2015)

CocoaTouchWide Color on the Screen NEW

Page 224: Working with Wide Color - Apple Inc....File Formats and Color Profiles Use “Display P3” color profile for RGB working space Use 16 bit per channel color mode Use iMac (Late 2015)

CocoaTouchWide Color on the Screen NEW

UIView

draw(_ rect: CGRect) // called in the extended sRGB color space

Page 225: Working with Wide Color - Apple Inc....File Formats and Color Profiles Use “Display P3” color profile for RGB working space Use 16 bit per channel color mode Use iMac (Late 2015)

CocoaTouchWide Color on the Screen NEW

UIView

draw(_ rect: CGRect) // called in the extended sRGB color space

UIImageViewColor managed since iOS 9.3

Page 226: Working with Wide Color - Apple Inc....File Formats and Color Profiles Use “Display P3” color profile for RGB working space Use 16 bit per channel color mode Use iMac (Late 2015)

CocoaTouchWide Color on the Screen NEW

Page 227: Working with Wide Color - Apple Inc....File Formats and Color Profiles Use “Display P3” color profile for RGB working space Use 16 bit per channel color mode Use iMac (Late 2015)

CocoaTouchWide Color on the Screen

UITraitCollection.displayGamut

NEW

Page 228: Working with Wide Color - Apple Inc....File Formats and Color Profiles Use “Display P3” color profile for RGB working space Use 16 bit per channel color mode Use iMac (Late 2015)

CocoaTouchWide Color on the Screen

UITraitCollection.displayGamut

UIDisplayGamut

NEW

Page 229: Working with Wide Color - Apple Inc....File Formats and Color Profiles Use “Display P3” color profile for RGB working space Use 16 bit per channel color mode Use iMac (Late 2015)

CocoaTouchWide Color on the Screen

UITraitCollection.displayGamut

UIDisplayGamut

• .P3

NEW

Page 230: Working with Wide Color - Apple Inc....File Formats and Color Profiles Use “Display P3” color profile for RGB working space Use 16 bit per channel color mode Use iMac (Late 2015)

CocoaTouchWide Color on the Screen

UITraitCollection.displayGamut

UIDisplayGamut

• .P3

• .SRGB

NEW

Page 231: Working with Wide Color - Apple Inc....File Formats and Color Profiles Use “Display P3” color profile for RGB working space Use 16 bit per channel color mode Use iMac (Late 2015)

Controlling the depth—CocoaTouchWide Color on the Screen

For UIView, use the view’s layer’s contentsFormat property

NEW

Page 232: Working with Wide Color - Apple Inc....File Formats and Color Profiles Use “Display P3” color profile for RGB working space Use 16 bit per channel color mode Use iMac (Late 2015)

Controlling the depth—CocoaTouchWide Color on the Screen

For UIView, use the view’s layer’s contentsFormat propertyValid CALayer contents formats:• kCAContentsFormatRGBA8Uint• kCAContentsFormatRGBA16Float• kCAContentsFormatGray8Uint

NEW

Page 233: Working with Wide Color - Apple Inc....File Formats and Color Profiles Use “Display P3” color profile for RGB working space Use 16 bit per channel color mode Use iMac (Late 2015)

CocoaWide Color on the Screen

NSView

Page 234: Working with Wide Color - Apple Inc....File Formats and Color Profiles Use “Display P3” color profile for RGB working space Use 16 bit per channel color mode Use iMac (Late 2015)

CocoaWide Color on the Screen

NSView• draw(_ dirtyRect: NSRect)

Page 235: Working with Wide Color - Apple Inc....File Formats and Color Profiles Use “Display P3” color profile for RGB working space Use 16 bit per channel color mode Use iMac (Late 2015)

CocoaWide Color on the Screen

NSView• draw(_ dirtyRect: NSRect)

• viewDidChangeBackingProperties()

Page 236: Working with Wide Color - Apple Inc....File Formats and Color Profiles Use “Display P3” color profile for RGB working space Use 16 bit per channel color mode Use iMac (Late 2015)

CocoaWide Color on the Screen

NSView• draw(_ dirtyRect: NSRect)

• viewDidChangeBackingProperties()

• NSWindowDidChangeBackingPropertiesNotification //from your view’s window

Page 237: Working with Wide Color - Apple Inc....File Formats and Color Profiles Use “Display P3” color profile for RGB working space Use 16 bit per channel color mode Use iMac (Late 2015)

CocoaWide Color on the Screen

NSView• draw(_ dirtyRect: NSRect)

• viewDidChangeBackingProperties()

• NSWindowDidChangeBackingPropertiesNotification //from your view’s window

• Backing properties include scale, color spaceand output display gamut

Page 238: Working with Wide Color - Apple Inc....File Formats and Color Profiles Use “Display P3” color profile for RGB working space Use 16 bit per channel color mode Use iMac (Late 2015)

Controlling the Depth—CocoaWide Color on the Screen

Use NSWindow’s depthLimit property to control how large the NSWindow’s backing store will be

Page 239: Working with Wide Color - Apple Inc....File Formats and Color Profiles Use “Display P3” color profile for RGB working space Use 16 bit per channel color mode Use iMac (Late 2015)

Controlling the Depth—CocoaWide Color on the Screen

Use NSWindow’s depthLimit property to control how large the NSWindow’s backing store will be

NSWindowDepth• NSWindowDepthTwentyfourBitRGB• NSWindowDepthSixtyfourBitRGB• NSWindowDepthOnehundredtwentyeightBitRGB

Page 240: Working with Wide Color - Apple Inc....File Formats and Color Profiles Use “Display P3” color profile for RGB working space Use 16 bit per channel color mode Use iMac (Late 2015)

Summary

Page 241: Working with Wide Color - Apple Inc....File Formats and Color Profiles Use “Display P3” color profile for RGB working space Use 16 bit per channel color mode Use iMac (Late 2015)

Summary

Wide Color is technology for the next generation of displays

Page 242: Working with Wide Color - Apple Inc....File Formats and Color Profiles Use “Display P3” color profile for RGB working space Use 16 bit per channel color mode Use iMac (Late 2015)

Summary

Wide Color is technology for the next generation of displaysColor Gamuts and Color Management

Page 243: Working with Wide Color - Apple Inc....File Formats and Color Profiles Use “Display P3” color profile for RGB working space Use 16 bit per channel color mode Use iMac (Late 2015)

Summary

Wide Color is technology for the next generation of displaysColor Gamuts and Color ManagementWorking with wide gamut content

Page 244: Working with Wide Color - Apple Inc....File Formats and Color Profiles Use “Display P3” color profile for RGB working space Use 16 bit per channel color mode Use iMac (Late 2015)

Summary

Wide Color is technology for the next generation of displaysColor Gamuts and Color ManagementWorking with wide gamut contentUsing colors in your application

Page 245: Working with Wide Color - Apple Inc....File Formats and Color Profiles Use “Display P3” color profile for RGB working space Use 16 bit per channel color mode Use iMac (Late 2015)

Summary

Wide Color is technology for the next generation of displaysColor Gamuts and Color ManagementWorking with wide gamut contentUsing colors in your applicationAdapting your drawing code to wide color gamut

Page 246: Working with Wide Color - Apple Inc....File Formats and Color Profiles Use “Display P3” color profile for RGB working space Use 16 bit per channel color mode Use iMac (Late 2015)

More Information

https://developer.apple.com/wwdc16/712

Page 247: Working with Wide Color - Apple Inc....File Formats and Color Profiles Use “Display P3” color profile for RGB working space Use 16 bit per channel color mode Use iMac (Late 2015)

Related Sessions

Advances in iOS Photography Pacific Heights Tuesday 11:00AM

What's New in Cocoa Nob Hill Tuesday 11:00AM

What's New in Cocoa Touch Presidio Tuesday 1:40PM

What's New in Metal, Part 2 Pacific Heights Wednesday 1:40PM

Live Photo Editing and RAW Processing with Core Image Nob Hill Thursday 11:00AM

Advances in SceneKit Rendering Mission Thursday 11:00AM

Page 248: Working with Wide Color - Apple Inc....File Formats and Color Profiles Use “Display P3” color profile for RGB working space Use 16 bit per channel color mode Use iMac (Late 2015)

Related Sessions

What's New in SpriteKit Presidio Thursday 5:00PM

Crafting Modern Cocoa Apps Pacific Heights Friday 5:00PM

Page 249: Working with Wide Color - Apple Inc....File Formats and Color Profiles Use “Display P3” color profile for RGB working space Use 16 bit per channel color mode Use iMac (Late 2015)

Labs

Live Photo and Core Image Lab Graphics, Games, and Media Lab C Thursday 1:30PM

Cocoa Lab Frameworks Lab D Thursday 2:00PM

SceneKit Lab Graphics, Games, and Media Lab A Thursday 3:00PM

Live Photo and Core Image Lab Graphics, Games, and Media Lab D Friday 9:00AM

Cocoa Touch and 3D Touch Lab Frameworks Lab C Friday 10:30AM

Page 250: Working with Wide Color - Apple Inc....File Formats and Color Profiles Use “Display P3” color profile for RGB working space Use 16 bit per channel color mode Use iMac (Late 2015)

Labs

SpriteKit Lab Graphics, Games, and Media Lab B Friday 12:00PM

Color Lab Graphics, Games, and Media Lab C Friday 4:00PM

Safari and WebKit Lab Frameworks Lab C Friday 4:30PM

Page 251: Working with Wide Color - Apple Inc....File Formats and Color Profiles Use “Display P3” color profile for RGB working space Use 16 bit per channel color mode Use iMac (Late 2015)