• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
RGB color values for NSColor
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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.

  • Follow-Ups:
    • Re: RGB color values for NSColor
      • From: Andreas Mayer <email@hidden>
  • Prev by Date: Re: Another memory question
  • Next by Date: NSview object control TextField?
  • Previous by thread: Re: We are looking for developers for small productivity applications
  • Next by thread: Re: RGB color values for NSColor
  • Index(es):
    • Date
    • Thread