Copy RGB or HEX color values from the Color Picker
Thu, Mar 6 2008 at 7:30AM PST • Contributed by: b.leopard
Thu, Mar 6 2008 at 7:30AM PST • Contributed by: b.leopard
As one might know, Apple has included a system-wide application called Color Picker with OS X. You can call it in every application that supports it, like TextEdit or Mail.app. Color Picker allows you to modify colors, choosing colors from a color wheel, HSB sliders, etc. (More about the Color Picker.)
Problem: The Color Picker is a fantastic tool to select a color, but you can't copy the result for use in other programs. You can extend Color Picker with the free Hex Color Picker, but not everybody likes to receive a HEX code. What about copying the RGB values as text to insert them wherever you want?
Here's my solution: A little AppleScript calls Color Picker and parses the result. A dialog appears, asking you about the desired format for the copied values:
ATTENTION: If you are copying from the "color sliders" tab (second from left), than the selcted ColorSync profile will dramatically influence the values. I found no way to get the uncorrected color, nor did I find a solution to receive the name of the choosen colorsync profile.
[robg adds: This works as described.]
Problem: The Color Picker is a fantastic tool to select a color, but you can't copy the result for use in other programs. You can extend Color Picker with the free Hex Color Picker, but not everybody likes to receive a HEX code. What about copying the RGB values as text to insert them wherever you want?
Here's my solution: A little AppleScript calls Color Picker and parses the result. A dialog appears, asking you about the desired format for the copied values:
- 8-bit RGB with values from 0 to 65535 (class:RGB color, red:8bitvalue, green:8bitvalue, blue:8bitvalue)
- 16-bit RGB with values from 0 to 255 (class:RGB color, red:16bitvalue, green:16bitvalue, blue:16bitvalue)
- HEX with leading #
ATTENTION: If you are copying from the "color sliders" tab (second from left), than the selcted ColorSync profile will dramatically influence the values. I found no way to get the uncorrected color, nor did I find a solution to receive the name of the choosen colorsync profile.
[robg adds: This works as described.]
•
[9,089 views]
