• 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
need to convert CMYK to RGB please
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

need to convert CMYK to RGB please


  • Subject: need to convert CMYK to RGB please
  • From: Brian Christmas <email@hidden>
  • Date: Tue, 17 Nov 2009 22:21:51 +1100

G'day scripters

My apologies if this lists twice, but I seem to be having problems posting to the list.

I'm a newbie to ASOC.

I'm tearing my hair out over this. I've got a script that fetches the color from a color well. Problem is, if the return is in CMYK format, the script crashes.

I've tried all sorts of things to convert the CMYK to RGB but still get the same error..

the code

on colorWellSet_(sender)
       try
           set ThetempColor to theMainColorWell's |color|
           --set ThetempColor to |color| of ThetempColor's colorUsingColorSpaceName_calibratedRGBColorSpace
           log 1
           log
           set ThetempColor to theMainColorWell's colorUsingColorSpaceName_NSCalibratedRGBColorSpace
           log 2
           log
           set ThetempColor to |color| of theMainColorWell's colorUsingColorSpaceName_NSCalibratedRGBColorSpace
           log 3
           log
           set ThetempColor to ThetempColor's colorUsingColorSpaceName_NSCalibratedRGBColorSpace
           --set ThetempColor to theMainColorWell's colorSpaceCreateWith_colorSpaceGenericRGB
           set temp1 to ThetempColor's redComponent()
           set temp2 to ThetempColor's greenComponent()
           set temp3 to ThetempColor's blueComponent()
           set TheColor to {(temp1 * 65535), (temp2 * 65535), (temp3 * 65535)}
       on error errmsg
           display dialog errmsg
       end try
   end colorWellSet_
   

results in the log....

17/11/09 10:45:29 AM    Mail Manager Reporter[966]    <Mail_Manager_ReporterAppDelegate @0x2007d6040: OSAID(4)>
17/11/09 10:45:29 AM    Mail Manager Reporter[966]    [<NSColorWell 0x2007ae6a0> valueForUndefinedKey:]: this class is not key value coding-compliant for the key colorUsingColorSpaceName_NSCalibratedRGBColorSpace.

What am I doing wrong please, I'm getting worn out here!

Regards

Santa

 _______________________________________________
Do not post admin requests to the list. They will be ignored.
Applescriptobjc-dev mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:

This email sent to email@hidden

  • Prev by Date: need to convert CMYK to RGB please
  • Next by Date: Apple Script For Opening External EML File With Apple Mail
  • Previous by thread: need to convert CMYK to RGB please
  • Next by thread: Apple Script For Opening External EML File With Apple Mail
  • Index(es):
    • Date
    • Thread