Hi,

[NSColor whiteColor] produced a color which using the 
NSCalibratedWhiteColorSpace, and “hue” component is not exists in a "white-only 
colorspace”. In other words, that is not an RGB color space, that color space 
only contains white - but hue cannot be interpreted there.

Tamas

> On 01 Nov 2014, at 20:36, Torsten Curdt <[email protected]> wrote:
> 
> I am struggling to understand why this causes an exception
> 
>    NSColor *base = [NSColor whiteColor];
>    NSColor *stroke = [NSColor colorWithCalibratedHue:base.hueComponent
> 
> saturation:base.saturationComponent
>                                           brightness:0.4
>                                                alpha:base.alphaComponent];
> 
> "-hueComponent not valid for the NSColor NSCalibratedWhiteColorSpace 1 1;
> need to first convert colorspace."
> 
> While the following colors work OK
> 
> - [NSColor colorWithRed:1.0 green:1.0 blue:1.0 alpha:1.0]
> - [NSColor redColor]
> 
> Can anyone offer some insights?
> 
> cheers,
> Torsten
> _______________________________________________
> 
> Cocoa-dev mailing list ([email protected])
> 
> Please 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:
> https://lists.apple.com/mailman/options/cocoa-dev/tamas.lov.nagy%40gmail.com
> 
> This email sent to [email protected]


_______________________________________________

Cocoa-dev mailing list ([email protected])

Please 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:
https://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to [email protected]

Reply via email to