Re: Setting a color in a NSBitmapImageRep to white or black
Re: Setting a color in a NSBitmapImageRep to white or black
- Subject: Re: Setting a color in a NSBitmapImageRep to white or black
- From: Graham Cox <email@hidden>
- Date: Fri, 18 Feb 2011 11:55:46 +1100
On 18/02/2011, at 11:40 AM, John Joyce wrote:
> Instead of -whiteColor is it not possible to simply create a color using 255 a.k.a. FF for R, G and B respectively?
> This is white in RGB.
Also, this is incorrect.
This assumes two things - that colour components have 8 bits and that all bits set represent full brightness of the component. Both of these things depend on the colour space. Typically, colour components are expressed as a float value between 0 and 1.0 relative to the colourspace, and are mapped to the actual number of bits per component (modulo colour calibration) in a bitmap internally.
The colour model of Windows 3 (and Colour QuickDraw for that matter) are long behind us.
--Graham
_______________________________________________
Cocoa-dev mailing list (email@hidden)
Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden