Re: Deciding whether text should be black or white for a given background color
Re: Deciding whether text should be black or white for a given background color
- Subject: Re: Deciding whether text should be black or white for a given background color
- From: Alastair Houghton <email@hidden>
- Date: Mon, 4 Dec 2006 17:46:12 +0000
On 4 Dec 2006, at 17:36, Keith Blount wrote:
So, my question is, is there a simple way of deciding whether black
or white provides the best contrast for any given NSColor?
An easy way is to call -brightnessComponent on your NSColor and use
that to make the decision.
Kind regards,
Alastair.
--
http://alastairs-place.net
_______________________________________________
Cocoa-dev mailing list (email@hidden)
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