Getting the foreground color - or - subscribing to events

Hey guys,
I'm still working on my native color picker. It's up and running and looking good. I've implemented so that the eyedropper tool is chosen when the cursor is moved outside the window (using javascript), just as the default color picker.
So I need to get notified when a new color is picked, or be able to pull the color in a thread. Getting the color is easy in javascript: "app.foregroundColor", but I have no idea how to get the result.
Any ideas how to do this in native code? Any ideas or help is appreciated!

John,
I'm using Adobe RGB 1998 everywhere.  The images look fine in LR 
before and after I export them.  I just sent it via Safari and Gmail 
(attached the photo from a folder) and it looked ok.  I also just 
tried sending it out of LR using the Mail "action" (my normal 
procedure) and it looked ok this time!  This is weird as this is the 
same photo that got my attention in the first place.  I hope this 
isn't an intermittent problem as it will drive me (and my clients) 
nuts.  Sounds like more testing is ahead of me.
Thanks for your response.  If something else comes to mind let me know.

Similar Messages

  • How to get the foreground/background color in photoshop.

    I want to get the foreground or background color at runtime ( by any action ) in photoshop.
    What steps should I follow.

    For example here is a script I use within Photoshop Actions to save and restore the users foreground and background colors so the action can mess with Photoshops foreground and background colors during its processing.
    SaveAndRestoreColors.jsx
    /* ======================================================================================
    // 2009  John J. McAssey (JJMack)  http://www.mouseprints.net/
    // This script is supplied as is. It is provided as freeware.
    // The author accepts no liability for any problems arising from its use.
    // This script is designed to be used by a Photoshop Action twice
    // A good pratice to use when creating an actions that use this scipt is for the action
    // not to do a save or play some other action between its two useages of this Script.
    // The first time this script is used by an action Photoshops Current Forground
    // and Background Colors are saved into the document's meta-data Info Instructions field.
    // The second time this script used by the action the script retreives what was
    // saved in the meta-data during the first usage and these colors are set.
    // and the saved data is removed from the document's meta-data Info Instructions field.
    // ===================================================================================== */
    <javascriptresource>
    <about>$$$/JavaScripts/SaveAndRestoreColors/About=JJMack's SaveAndRestoreColors.^r^rCopyright 2009 Mouseprints.^r^rRun twice script utility for action.^rNOTE:Don't play other actions between runs!^r^rFirst Run records Photoshops foreground and background swatch colors.^rSecond Run restores the recorded colors and removes the recording.</about>
    <category>JJMack's Action Run Twice Utility</category>
    </javascriptresource>
    if (app.documents.length > 0) {
    if (app.activeDocument.info.instructions.indexOf("<Colorf>") == -1 ){ // no footprint fisrt useage
    //alert("first");
    // Retreive Document information for Foot Print
    saveforeColor = new SolidColor;
    saveforeColor.rgb.red = app.foregroundColor.rgb.red;
    saveforeColor.rgb.green = app.foregroundColor.rgb.green;
    saveforeColor.rgb.blue = app.foregroundColor.rgb.blue;
    savebackColor = new SolidColor;
    savebackColor.rgb.red = app.backgroundColor.rgb.red;
    savebackColor.rgb.green = app.backgroundColor.rgb.green;
    savebackColor.rgb.blue = app.backgroundColor.rgb.blue;
    // put footprint in metadata info instructions
    app.activeDocument.info.instructions = app.activeDocument.info.instructions + "<Colorf>" + saveforeColor.rgb.red + "," + saveforeColor.rgb.green + "," + saveforeColor.rgb.blue + "</Colorf>" + "<Colorb>" + savebackColor.rgb.red + "," + savebackColor.rgb.green + "," + savebackColor.rgb.blue + "</Colorb>";
    //alert( "Saved ="  + "<Colorf>" + saveforeColor.rgb.red + "," + saveforeColor.rgb.green + "," + saveforeColor.rgb.blue + "</Colorf>" + "<Colorb>" + savebackColor.rgb.red + "," + savebackColor.rgb.green + "," + savebackColor.rgb.blue + "</Colorb>");
    else {
    //alert("second");
    // Retreive saved information
    colorfOffset = app.activeDocument.info.instructions.indexOf("<Colorf>") + "<Colorf>".length;
    colorfLength = app.activeDocument.info.instructions.indexOf("</Colorf") -colorfOffset;
    saveforeColor = app.activeDocument.info.instructions.substr(colorfOffset, colorfLength);
    colorbOffset = app.activeDocument.info.instructions.indexOf("<Colorb>") + "<Colorb>".length;
    colorbLength = app.activeDocument.info.instructions.indexOf("</Colorb") -colorbOffset;
    savebackColor = app.activeDocument.info.instructions.substr(colorbOffset, colorbLength);
    //alert("Colorf = " + saveforeColor + " Colorb = " + savebackColor );
    // Restore Colors
    app.foregroundColor.rgb.red = saveforeColor.substr(0,saveforeColor.indexOf(","));
    saveforeColor = saveforeColor.substr(saveforeColor.indexOf(",") + 1,saveforeColor.length);
    app.foregroundColor.rgb.green = saveforeColor.substr(0,saveforeColor.indexOf(","));
    saveforeColor = saveforeColor.substr(saveforeColor.indexOf(",") + 1,saveforeColor.length);
    app.foregroundColor.rgb.blue = saveforeColor ;
    app.backgroundColor.rgb.red = savebackColor.substr(0,savebackColor.indexOf(","));
    savebackColor = savebackColor.substr((savebackColor.indexOf(",") + 1),savebackColor.length);
    app.backgroundColor.rgb.green = savebackColor.substr(0,savebackColor.indexOf(","));
    savebackColor = savebackColor.substr(savebackColor.indexOf(",") + 1,savebackColor.length);
    app.backgroundColor.rgb.blue = savebackColor ;
    // Remove footprint from metadata info instructions
    before = app.activeDocument.info.instructions.substr(0,app.activeDocument.info.instructions.indexO f("<Colorf>"));
    afterOffset = app.activeDocument.info.instructions.indexOf("</Colorb>") + "</Colorb>".length;
    after = app.activeDocument.info.instructions.substr(afterOffset, app.activeDocument.info.instructions.length - afterOffset);
    //alert ("before = " + before + " after = " + after);
    app.activeDocument.info.instructions = before + after;
    else { alert("You must have at least one open document to run this script!"); }

  • Performance is very slow, i continue to get the spinning color wheel whenever i try anything (email, browser, word, etc)  any ideas

    Performance is very slow.
    I continue to get the spinning color wheel on whatever I try.
    It doesnt matter if its an email, browser or document of any kind it takes several seconds for anything to happen.

    Hello, see how many of these you can answer...
    See if the Disk is issuing any S.M.A.R.T errors in Disk Utility...
    http://support.apple.com/kb/PH7029
    Open Activity Monitor in Applications>Utilities, select All Processes & sort on CPU%, any indications there?
    How much RAM & free space do you have also, click on the Memory & Disk Usage Tabs.
    Open Console in Utilities & see if there are any clues or repeating messages when this happens.
    In the Memory tab, are there a lot of Pageouts?

  • How to get the reverse color of a color

    how to get the reverse color of a color
    thanks

    int red = Math.abs(255 - oldColor.getRed());
    int green = Math.abs(255 - oldColor.getGreen());
    int blue = Math.abs(255 - oldColor.getBlue());
    java.awt.Color inverseColor = new java.awt.Color(red, green, blue);
    Where oldColor is a java.awt.Color object.
    Hope this is want u need !!!

  • My 24" iMac seems to gets the spinning colored ball a lot, seems it is running slow a lot more than it did before any suggestion?

    My 24” iMac seems to gets the spinning colored ball a lot, seems it is running slow a lot more than it did before any suggestion?

    Open Activity Monitor in Applications>Utilities, select All Processes & sort on CPU%, any indications there?
    How much RAM & free space do you have also, click on the Memory & Disk Usage Tabs.
    In the Memory tab, are there a lot of Pageouts?

  • In Preview, I suddenly am unable to get the "Adjust Color" tool panel to edit images. I just get the rectangular image selection tool instead. How do I ge the "Adjust Color" tool panel back?

    In Preview, I suddenly am unable to get the "Adjust Color" tool panel to edit images. I just get the rectangular image selection tool instead. How do I ge the "Adjust Color" tool panel back?

    Hmmm, I wonder if that window is hidden or off screen? Have you moved the pic window around to look under it?
    Might try this...
    Safe Boot , (holding Shift key down at bootup), use Disk Utility from there to Repair Permissions.
    Then move these files to the Desktop for now...
    /Users/YourUserName/Library/Preferences/com.apple.finder.plist
    /Users/YourUserName/Library/Preferences/com.apple.systempreferences.plist
    /Users/YourUserName/Library/Preferences/com.apple.desktop.plist
    /Users/YourUserName/Library/Preferences/com.apple.recentitems.plist
    /Users/YourUserName/Library/Preferences/com.apple.Preview.plist
    /Users/YourUserName/Library/Preferences/com.apple.Preview.bookmarks.plist
    Reboot & test.
    PS. Safe boot may stay on the gray radian for a long time, let it go, it's trying to repair the Hard Drive.

  • How to get the "CMYK" Color percentages?

    Could you please advise me how to get the "CMYK" Color percentages of every pixel via scripting.

    You have to be patched to the 10.0.2 version of FM and you must use the CMYK option with SaveAsPDF. If thee colour is defined as Spot in the FM file, it should remain as a spot colour in th PDF. However, that being said, the CMYK route is still a bit wonky (even in FM12) and you may get odd results in your PDF.
    Alternatives are to make the fix in Acrobat with the Print Production tools (or even better to use a third-party tool like Enfocus Pro) or to use GrafikHuset's (now freebie) PubliPDF to convert FM's RGB postscript output to CMYK+Spot PDFs. Download at: http://design.grafikhuset.dk/index.php/kontakt/downloads/grafikhuset-publi-pdf and more details available at: http://www.grafikhuset.net/PubliPDF/

  • When I am in e-mail. I get the spinning color wheel. Then, when I check the activity montior, it notes high cpu usage (99%) for "Safari web content.". then I quit this process and cpu usage drops way done. but I have to log in again to my e-mail. what can

    When I am in e-mail, I sometimes get the spinning color wheel, which lock up everything. when it doesn't go away, I see on the activity monitor, that CPU usage is very high (99%), for a process calles " Safari web content'. When I click on the proccess and quite, the CPUusage goes way down. Problem is that I have to then log back in to e-mail. What can I do to eliminate this proble.  thanks

    How much FREE RAM do you have when this occurs. It's easy to tell, when it beach balls open Activity Monitor (Applications - Utilities - Activity Monitor) click the System Memory tab and note how much FREE RAM is listed. If it's 500MB or less it's time for a RAM upgrade.

  • I tried to download some photos from a corrupted CD and now every time I try to open iPhoto the frame pops up but nothing will load.  I just get the spinning color wheel.  Any ideas???

    I tried to download some photos from a corrupted CD and now every time I try to open iPhoto the frame pops up but nothing will load.  I just get the spinning color wheel.  Any ideas???

    What version of iPhoto? Assuming 09 or later:
    Option 1
    Back Up and try rebuild the library: hold down the command and option (or alt) keys while launching iPhoto. Use the resulting dialogue to rebuild. Choose to Rebuild iPhoto Library Database from automatic backup.
    If that fails:
    Option 2
    Download iPhoto Library Manager and use its rebuild function. This will create a new library based on data in the albumdata.xml file. Not everything will be brought over - no slideshows, books or calendars, for instance - but it should get all your albums and keywords back.
    Because this process creates an entirely new library and leaves your old one untouched, it is non-destructive, and if you're not happy with the results you can simply return to your old one. .
    Regards
    TD

  • Help!!! How do I get the bit color depth the user has his screen set to?

    Help!!! How do I get the bit color depth the user has his screen set to?
    Thank you.

    i'm not sure if it's what you 're looking for but it worked for me:
    GraphicsEnvironment ge = GraphicsEnvironment.getLocalGraphicsEnvironment();
    GraphicsDevice[] gs = ge.getScreenDevices();
    for(int i=0;i<gs.length;i++){ //length is 1 (= i have only one screen? )
    GraphicsDevice g=gs[ i ];
    int nBits=g.getDisplayMode().getBitDepth(); //method getDisplayMode() only in jdk1.4 , i think
    System.out.println( nBits+"");
    output is 32 if i set my screen color to 32bits, 24 if...24, ...

  • Getting the correct color palette for mobile phones

    Can someone help me getting the correct colors for the phones? I know there is 256 and occationally 4096 colors, but which are the valid ones?. I keep getting colors melting together since i am using the wrong palette, is it the "webb-safe" colors that are also in the phones? If anyone could please enlighten me I would be really happy, since otherwise I have to write a program that displays them in the emulator and then manually check the hex values to get the correct ones.
    Thanks..
    /Fnutten

    Thanks for the answer, I have downloaded nokias emulators instead to view the colors ( 24bit ). If I someday compile for phones with lower colors I have to take care of it then instead.
    /Fnutten

  • Getting the background color from a row

    I'm displaying a table that has alternating row colors for odd and even... when I click on a row I am changing the color to blue. When I click on a different row I want to set the background color back to what it was for the originally selected row and change the currently selected row to blue. This worked just fine when I had the colors hard coded into the code... but as soon as I started using style sheets it stoped working,
    My questions is how do I get the background color from a row... for instance, the following alert dislays nothing. How can I get the actual color out for the row?
    var tableElem = document.getElementById('table');
    var rowElem;
    rowElem = tableElem.rows[0];
    alert(rowElem.bgColor);
              

    If you're working with style sheets, then ignore the background color. You don't want to care what color is actully being used, only that the correct style is in place.
    Worry instead about the className property for your row:<style>
    .highlightRow {
       color: white;
       background-color: gray;
    .normalRow {
       color: black;
       background-color: white;
    </style>
    var tableElem = document.getElementById("table");
    var rowElem = tableElem.rows[0];
    alert(rowElem.className);
    <table id="table">
    <tr class="normalRow"><td>...</td></tr>
    <tr class="highlightRow"><td>...</td></tr>
    </table>

  • Calendar entry takes along time.  I get the spinning color wheel after each tab.

    Calendar entry takes along time.  I get the spinning color wheel after each tab.  How do I avoid this?

    Launch the Console application in any of the following ways:
    ☞ Enter the first few letters of its name into a Spotlight search. Select it in the results (it should be at the top.)
    ☞ In the Finder, select Go ▹ Utilities from the menu bar, or press the key combination shift-command-U. The application is in the folder that opens.
    ☞ Open LaunchPad. Click Utilities, then Console in the icon grid.
    Make sure the title of the Console window is All Messages. If it isn't, select All Messages from the SYSTEM LOG QUERIES menu on the left. If you don't see that menu, select
    View ▹ Show Log List
    from the menu bar.
    Click the Clear Display icon in the toolbar. Then try the action that you're having trouble with again. Select any messages that appear in the Console window. Copy them to the Clipboard (command-C). Paste into a reply to this message (command-V).
    When posting a log extract, be selective. In most cases, a few dozen lines are more than enough.
    Please do not indiscriminately dump thousands of lines from the log into this discussion.
    Important: Some private information, such as your name, may appear in the log. Anonymize before posting.

  • When I open iphoto, I only get the spinning color wheel

    When I open iphoto, the window is blank and I just get the spinning color wheel.  I have OSX 10.6.8.  The last time I used iphoto I had deleted over 100GB of photos (they were backed up to an external hard drive). Now I just get the spinning wheel.  I have to force quit to shut it down.

    Option 1
    Back Up and try rebuild the library: hold down the command and option (or alt) keys while launching iPhoto. Use the resulting dialogue to rebuild. Choose to Rebuild iPhoto Library Database from automatic backup.
    If that fails:
    Option 2
    Download iPhoto Library Manager and use its rebuild function. This will create a new library based on data in the albumdata.xml file. Not everything will be brought over - no slideshows, books or calendars, for instance - but it should get all your albums and keywords back.
    Because this process creates an entirely new library and leaves your old one untouched, it is non-destructive, and if you're not happy with the results you can simply return to your old one. .
    Regards
    TD

  • I get the revolving color wheel whenever I click on anything online.

    I get the revolving color wheel whenever I click on anything online.

    How much FREE RAM do you have when this occurs. It's easy to tell, when it beach balls open Activity Monitor (Applications - Utilities - Activity Monitor) click the System Memory tab and note how much FREE RAM is listed. If it's 500MB or less it's time for a RAM upgrade.

Maybe you are looking for

  • Not able to EDIT the data in PSA

    Hi Experts, I had created cube and it has following seeting 1) Three  dimensions i.e. Employee_No, Employee_name and Time 2) Key figures i.e. Salary and Tax Procedure What I have followed ======================= 1. Created one CSV file and it contain

  • NOKIA 5530 XPRESS MUSIC :WIFI "NO GATEWAY reply"

    I have brought nokia 5530 xpress music ....I want to use wifi but the problem is after getting connected to the wifi server..when I press "start web browsing " then the reply comes no gateway reply... These are my wlan wizard setting after connection

  • Re: BPM Help

    Hello! ALL I am trying to develop a BPM which would send a asynchronous I/B shipment request message proxy message to SAP ECC (message coming form Sender will be transformed to Shipment Request Proxy) and once this proxy is processed. SAP ECC would a

  • Why won't 9.7 upgrade to10.8?

    Why won't 9.7 upgrade to 10.8? I checked for software updates and it says no available updates available.

  • Target sytem connectivity

    Hi, I am getting error At Line 45 in FDM, It says unable to connect to the target system (HFM). I re registered and configured adapter and verified the Machine profile settings and everything looks good. Pls let me know If I need to check anything el