• 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
Re: hueComponent not valid for the NSColor
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: hueComponent not valid for the NSColor


  • Subject: Re: hueComponent not valid for the NSColor
  • From: "Stephen J. Butler" <email@hidden>
  • Date: Sat, 01 Nov 2014 14:50:42 -0500

It's a color space that only contains a white and alpha component. Hue
doesn't make sense in an all white space. It's like if we were talking
about a train that only goes between NYC and DC, and you asked "How long
does it take for that train to reach London?" You can't ask that question
because the train doesn't go there. It doesn't have that degree of freedom.

Your second example has white in a RGB color space. That does have the
freedom to give you hue.

On Sat, Nov 1, 2014 at 2:36 PM, Torsten Curdt <email@hidden> 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@hidden)
>
> 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:
>
>
> This email sent to email@hidden
_______________________________________________

Cocoa-dev mailing list (email@hidden)

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:

This email sent to email@hidden


  • Follow-Ups:
    • Re: hueComponent not valid for the NSColor
      • From: Torsten Curdt <email@hidden>
References: 
 >hueComponent not valid for the NSColor (From: Torsten Curdt <email@hidden>)

  • Prev by Date: Re: hueComponent not valid for the NSColor
  • Next by Date: Re: hueComponent not valid for the NSColor
  • Previous by thread: Re: hueComponent not valid for the NSColor
  • Next by thread: Re: hueComponent not valid for the NSColor
  • Index(es):
    • Date
    • Thread