• 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 14:54:44 +1100

G'day scripters

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_
   
returns logs in every case of....

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: How to add tracks to a iTunes playlist?
  • Next by Date: need to convert CMYK to RGB please
  • Previous by thread: How to add tracks to a iTunes playlist?
  • Next by thread: need to convert CMYK to RGB please
  • Index(es):
    • Date
    • Thread