RE: Save Any Color
RE: Save Any Color
- Subject: RE: Save Any Color
- From: "Jonathan E. Jackel" <email@hidden>
- Date: Tue, 3 Jun 2003 15:30:00 -0400
I think you just need to convert the user's color to the RGB colorspace
before getting the color's RGB components. Check out
colorUsingColorSpaceName:, e.g.,
float red = [[userColor colorUsingColorSpaceName:NSCalibratedRGBColorSpace]
redComponent];
Jonathan
>
-----Original Message-----
>
From: email@hidden
>
[mailto:email@hidden]On Behalf Of Lorenzo
>
Sent: Tuesday, June 03, 2003 2:39 PM
>
To: email@hidden
>
Subject: Save Any Color
>
>
>
Hi,
>
the user choses a color and I have to save it.
>
The user can choose an RGB or CMYK or NSNamedColorSpace,...
>
then I get the 4 components (red green blue alpha), I put them into an
>
NSRect and I save the rect in a NSDictionary plist file. It works.
>
>
But if the user doesn't chooses an RGB color, later if I try to
>
get the red
>
or green or blueComponent I get an exception.
>
>
Is a way to get and save the color all the ways?
>
Thank you,
>
>
>
Best Regards
>
--
>
Lorenzo
>
email: email@hidden
>
_______________________________________________
>
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.
_______________________________________________
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.