Re: How to make an NSColor correspond to a grayscale value?
Re: How to make an NSColor correspond to a grayscale value?
- Subject: Re: How to make an NSColor correspond to a grayscale value?
- From: Ondra Cada <email@hidden>
- Date: Tue, 20 Aug 2002 23:51:02 +0200
On Tuesday, August 20, 2002, at 11:19 , John C. Randolph wrote:
How can I make an NSColor represent a grayscale color, which value is
between 0 and 255?
int howBright; // something between 0 and 255
NSColor *myGreyLevel = [NSColor colorWithCalibratedWhite:howBright/255
alpha:1.0];
Add at least one dot ("255."), lest the colour stays black ;)
---
Ondra Hada
OCSoftware: email@hidden
http://www.ocs.cz
private email@hidden
http://www.ocs.cz/oc
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.