Property hex_chars : "0123456789ABCDEF"'s characters I wrote a blog-post with more details about the problem.Īs Jon pointed out in his answer, the problem originates in the eye-dropper, so scripts are actually able to convert from 16-bit high color into "normal" 255-RGB and then HEX, but due to the fact that eye-dropper outputs incorrect value (from different color space, apparently), all further calculations are doomed.įirst, this is the script I use: set format to (button returned of (display dialog "Select the format of the chosen color for the clipboard." buttons ) But are those available to get in AppleScript? I mean, the very same standard Color Picker dialog that is called by choose color has RGB values (along with the Hex one) on its second tab (Color Sliders), so it is capable of returning values in those formats. My question is: can I control the output of this Color Picker dialog in AppleScript? By default it returns the color value in this format: (59432, 59441, 59428), which is a 16-bit high color, I believe.Ĭan I specify somehow that I want to get a "standard" RGB (with 255 as a maximum value) instead? Or any other? Or 16-bit high color is the only supported output format for choose color? That would be a pity, because as far as I know there is no way to get proper RGB/Hex values from 16-bit high color as it would involve rounding and approximation. So, selected color value will be copied to the clipboard. You dont need to load any third-party library or framework or any CSS or image files to make the color picker work. The fact that it does not have any other dependencies makes it even more appealing. I designed this colorscheme with both precise CIELAB lightness relationships and a refined set of hues based on fixed color wheel relationships. The iro.js color picker is the most feature-rich JavaScript color picker widget in our list. Return "(" & r & ", " & g & ", " & b & ")" as string Solarized is a sixteen color palette (eight monotones, eight accent colors) designed for use with terminal and gui applications.
It is possible to create an AppleScript that calls for the standard Mac OS Color Picker dialog ( choose color) and gets the output value after user picks some color: set the rez to choose color