![]() Property hex_chars : "0123456789ABCDEF"'s characters global impression of change color naming confrontation naming cross-out. 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 ) LMT LPRS LS LT MAC-CGI MAC-P MAC-S MC MCGBRS MDS mMMSE MMSE MOR MPM MPP MSCL. But are those available to get in AppleScript? The values shown are specific to the color space you choose. ![]() 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. Choose a different color space: Click the pop-up menu, then choose a color space. ![]() 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. 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
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |