RGB color values for NSColor
RGB color values for NSColor
- Subject: RGB color values for NSColor
- From: Rhon Fitzwater <email@hidden>
- Date: Tue, 26 Aug 2003 19:25:54 -0400
Below is how I am currently setting the color of my string so that it
is red.
stringAttributes =
[[NSDictionary dictionaryWithObjectsAndKeys:
[NSFont systemFontOfSize:36.0], NSFontAttributeName,
[NSColor redColor], NSForegroundColorAttributeName,
nil] retain];
This works but now I want to use three RGB color values to set the
color. Is this possible? I am getting the RGB values from a stored
preference file that looks like this:
color = "{ 30971, 32454, 65535}";
I am getting that data like this:
stringColor = [[dicttimervalue objectForKey: @"color"]retain];
This works fine. I am able to get the correct values.
What I need to know is how can I use these value to set the color in my
stringAttributes? I know just doing [NSColor timerColor] does not
work. can anyone show me some code that will do this or lead me in the
right direction.
Thanks in advance.
-Rhon
_______________________________________________
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.