Skip to content

Instantly share code, notes, and snippets.

@efc
Last active December 14, 2015 06:49
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save efc/5045807 to your computer and use it in GitHub Desktop.
Save efc/5045807 to your computer and use it in GitHub Desktop.
An AppleScript to convert a CMYK file to RGB using the ColorSync Utility. For some reason this works while sips --matchToWithIntent leaves the file all washed out and CMYKish. This script assumes a CMYK image is already open and the top window in ColorSync. I use it in combination with Automator.
tell application "System Events"
tell process "ColorSync Utility"
set visible to true
tell pop up button 1 of group 1 of front window
click
tell menu 1
click menu item "Match to Profile"
end tell
end tell
tell menu button 1 of group 1 of front window
click
tell menu 1
click menu item "Display"
tell menu item "Display"
tell menu 1
click menu item "sRGB IEC61966-2.1"
end tell
end tell
end tell
end tell
tell pop up button 2 of group 1 of front window
click
tell menu 1
click menu item "Perceptual"
end tell
end tell
tell button "Apply" of group 1 of front window
click
end tell
set frontmost to true
keystroke "s" using {command down}
keystroke "w" using {command down}
end tell
end tell
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment