Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

What's the difference between colorWithSRGBRed vs colorWithDeviceRed vs colorWithCalibratedRed

There are several convenience class methods for creating a NSColor. However, I can't seem to identify when to use the different class methods below:

colorWithSRGBRed:green:blue:alpha: vs colorWithDeviceRed:green:blue:alpha: vs colorWithCalibratedRed:green:blue:alpha:

like image 750
haroldcampbell Avatar asked Sep 24 '12 15:09

haroldcampbell


1 Answers

tl;dr Use the calibrated colour space.

Rather than regurgitate the documentation - the answer is in the Color Programming Topics

Also the Color Space Overview

enter image description here

Edited to add

sRGB is one of the named Color Spaces.

enter image description here

Finally - and this is the last image from the documentation, and I hope it answers your question - if you want to use a color space, use the calibrated one.

enter image description here

like image 95
Abizern Avatar answered Sep 22 '22 14:09

Abizern