Color sample reading funniness?

I am using CS4 and have been using PS since version 1.0. There is one thing about the way CS4 handles color samples that is different than previous version. If I have 3 different adjustment layers and check my color samples, the numbers will change depending which adjustment layer I am on. This doesn't make any sense and makes it harder to adjust color and tone. I am intersted in the final color with all of my adjustment layers combined. If I am trying to match color between files and I have a saturation adjustment layer and a curve adjustment layer above that, and I am keeping an eye on my color samples, if I adjust the saturation layer there is no easy way of seeing exactly what the numbers. While I am on the saturation layer the numbers night be 206,250,77, but then when I click on the curves layer the numbers are 219,251,96. So to really know what the numbers are you need to be on the top most layer. It was never like this before. I know this is normal opporation for CS4, but how are others dealin with this?
Another strange thing I found, and this is just with a particular file, but when I hover the color sample tool about an are I get different numbers under the eye dropper info and I do under my color sample point info. The shot is of a pair of jeans, and it's a pretty large file, around 26"x21"@300dpi. I have my eye dropper sample point set to 101. When I first hover the eye dropper abover the area I want to sample the reading in the upper left of the info pallete is 102,120,153 then as soon as I click the color sample point reading is 150,169,204. This was done on just the background layer, no other layer have yet been added. I even tried blurring the area to get rid of any texture, but still the same issue.
Well I just figure out what the issue is but I thought I would post this anyway. I found out if I zoomed into 100% first, then placed the sample point it worked like it is suppose to. I know that viewing both color and sharpness can vary slightly when your not at 100%, but I didn't think that it would effect the actual numbers?

I agree an altarable "Funny Factor" woud be a useful addition for CS5. Maybe a dial of some sort, turn it up and its funny, down and its not so funny.
Look at your eyedropper options there are checkboxes for Sample all layers and "sample size"

Similar Messages

  • Color Sampler not working outside my window! Urgent, please help!

    I just installed Photoshop on my Surface Pro 3. I am doing a presentation in a few hours where I will need to be able to demonstrate the use of the Color Sampler outside the window. It doesn't work. It goes up to the edge of the workspace but does not sample beyond that. I've tried using the pen, the trackpad and the mouse. None of them work. If I try to do it on my Windows 8.1 desktop, it works fine. Help!

    Just looked into this and have found a resolution. Always learning new tricks!! So forgive me I was wrong in the first post.
    You CAN do it by clicking within the workspace and then dragging outside so continually holding down then letting go outside the workspace.
    Colour sampling outside Photoshop | Shape Shed
    Hope this helps!

  • Photoshop CS3 color sampler info question

    I'm adjusting RGB images in CMYK preview mode using custom ICC profiles. In taking a color sample measurement using Color Sampler tool and Info Window, I can have the sample data display in RGB, CMYK or whatever.
    Is there a way to get each sample to display both RGB and CMYK numbers side by side?? This would be very helpful when 'correcting by the numbers'.

    that's what a figured but thought I should ask anyway. Perhaps it should be added to the feature request list.
    Thanks for the confirmation.

  • FW CS5 - Severe Color Sample Issue

    Howdy,
    I know there is another thread on color variations when using the color sampler but I am having a severe issue with sampling colors. No matter what I color sample the color it gives back is way off. An example would be purple comes back as a light gray. To better illustrate, I have created a quick video that shows how bad/frustrating it is.
    Here are my specs and what I have done so far...
    Specs
    MacBook Pro Retina (15")
    Mac OSX Mountain Lion  - 10.8.2
    Adobe Fireworks CS5 - 11.0.1.7 (11.2)
    What I have tried.
    Snap to web safe is NOT checked.
    Delete preferences (http://helpx.adobe.com/fireworks/kb/restore-preferences-fireworks-cs5.html)
    Re-install
    Still no luck. This doe not seem to be a common issue but I am wondering if this is an issue with CS5 and MacBook Pro Retina. Any thoughts on resolving?
    Any help greatly appreciated. : )

    Will they release an update to CS5 to address these issues? I'm not qualified to answer that, but the odds seem low. Nevertheless, you can report the issue(s) using Adobe's official bug report and feature request form:
    https://www.adobe.com/cfusion/mmform/index.cfm?name=wishform
    I like to include URLs to relevant forum posts in my bug reports, to provide additional information (like the video you've included) and reinforce that other users are also being affected, if applicable.
    You could also pipe up about it on the Adobe Fireworks Facebook page, but you won't likely receive a response.
    I wonder if there are any adjustments or accommodations that can be made at the computer- or OS-level that might help. (Something to do with the Retina aspect.) It's a long shot, but you might also try saving your Fireworks preferences and configuration files and then reinstalling Fireworks.

  • Using color sampler values with curves adjustment layer

    Hi, I have just started trying to teach myself javascript.  Based on preliminary research, it's become apparent that there are many functions in Photoshop that are either extremely cumbersome or impossible to code by hand without using the Script Listener.
    My  goal is as follows: first, I will manually load two photos as layers in a single document.  Then I will manually place two or more color sampler points on the document.  At this point I would like the script to create a curves adjustment layer (ideally clipped to layer 2) and place as individual channel anchor points  the RGB data from the color sampler points on Layer 2, and then adjust the output of the points on each channel to the color sampler RGB values of layer 1.  
    As my first script, I realize this is probably going to be a lot of work.
    I did find some code that returns the average value of manually placed color sampler points.  Conceptually then, I would need to add code which creates a new curves adjustment layer and adds those RGB values (from a specific layer)  as anchor points on the individual channels,  and then hides one layer and looks at the RGB values of the color sampler points, and uses them as the output values for each anchor point.
    Sounds simple enough from a conceptual standpoint.
    I'm looking for some guidance on how to get started.
    Which parts will I definitely need Scriptlistener for and will that be adequate to do the job?
    How would you recommend I get started on this?
    Thanks very much for any input.

    The function I had provided was an example into which you would need to feed the values you got with Mike’s code.
    The code below would create a Curves Layer as shown in the screenshot, but I’m not sure it would work reasonably for all cases.
    // with code by mike hale;
    // 2012, use it at your own risk;
    // call the function to run the script
    #target photoshop
    createCurveAdjustmetFromColorSamplers();
    // create a function fo hold most of the code
    function createCurveAdjustmetFromColorSamplers(){
        // first add some condition checks
        // needs an open document in a color mode that supports layers
        if(app.documents.length == 0 || ( app.activeDocument.mode == DocumentMode.BITMAP || app.activeDocument.mode == DocumentMode.INDEXEDCOLOR ) ){   
            alert('This script requires a document in Greyscale, RGB, CMYK, or Lab mode.');
            return;
        // check for at least two colorSamplers
        if(app.activeDocument.colorSamplers.length < 2 ){
            alert('This script requires at least two colorSamplers.');
            return;
        // last check for at least two layers - assume they will be on same level( not in layerSet )
        if(app.activeDocument.layers.length < 2 ){
            alert('This script requires at least two layers.');
            return;
        // create varaibles to hold the colorSampler's color property for each layer
        // for the bottom layer
        var outputArray = new Array();
        // for top layer - array could also be created this way
        var inputArray = [];
        // store the number of samples because it will be needed in more than one place
        var numberOfSamples = app.activeDocument.colorSamplers.length;
        // hide the top layer
        app.activeDocument.layers[0].visible = false;
        // collect the samples from the bottom layer
        for(var sampleIndex = 0; sampleIndex < numberOfSamples; sampleIndex++ ){
            outputArray.push(app.activeDocument.colorSamplers[sampleIndex].color);
        // turn the top layer back on
        app.activeDocument.layers[0].visible = true;
        // collect those samples
        for(var sampleIndex = 0; sampleIndex < numberOfSamples; sampleIndex++ ){
            inputArray.push(app.activeDocument.colorSamplers[sampleIndex].color);
        // make sure the top layer is the activeLayer
        app.activeDocument.activeLayer = app.activeDocument.layers[0];
    // create arrays of the color values:
    var theArray = [[0, 0, 0, 0, 0, 0]];
    for (var m = 0; m < inputArray.length; m++) {
    theArray.push([inputArray[m].rgb.red, outputArray[m].rgb.red, inputArray[m].rgb.green, outputArray[m].rgb.green, inputArray[m].rgb.blue, outputArray[m].rgb.blue]);
    theArray.push([255, 255, 255, 255, 255, 255]);
    // sort;
    theArray.sort(sortArrayByIndexedItem);
    // makeCurveAdjustmentLayer();
    rgbCurvesLayer (theArray)
    ////// make rgb curves layer //////
    function rgbCurvesLayer (theArray) {
    // =======================================================
    var idMk = charIDToTypeID( "Mk  " );
        var desc5 = new ActionDescriptor();
        var idnull = charIDToTypeID( "null" );
            var ref2 = new ActionReference();
            var idAdjL = charIDToTypeID( "AdjL" );
            ref2.putClass( idAdjL );
        desc5.putReference( idnull, ref2 );
        var idUsng = charIDToTypeID( "Usng" );
            var desc6 = new ActionDescriptor();
            var idType = charIDToTypeID( "Type" );
                var desc7 = new ActionDescriptor();
                var idpresetKind = stringIDToTypeID( "presetKind" );
                var idpresetKindType = stringIDToTypeID( "presetKindType" );
                var idpresetKindDefault = stringIDToTypeID( "presetKindDefault" );
                desc7.putEnumerated( idpresetKind, idpresetKindType, idpresetKindDefault );
            var idCrvs = charIDToTypeID( "Crvs" );
            desc6.putObject( idType, idCrvs, desc7 );
        var idAdjL = charIDToTypeID( "AdjL" );
        desc5.putObject( idUsng, idAdjL, desc6 );
    executeAction( idMk, desc5, DialogModes.NO );
    // =======================================================
    var idsetd = charIDToTypeID( "setd" );
        var desc8 = new ActionDescriptor();
        var idnull = charIDToTypeID( "null" );
            var ref3 = new ActionReference();
            var idAdjL = charIDToTypeID( "AdjL" );
            var idOrdn = charIDToTypeID( "Ordn" );
            var idTrgt = charIDToTypeID( "Trgt" );
            ref3.putEnumerated( idAdjL, idOrdn, idTrgt );
        desc8.putReference( idnull, ref3 );
        var idT = charIDToTypeID( "T   " );
            var desc9 = new ActionDescriptor();
            var idpresetKind = stringIDToTypeID( "presetKind" );
            var idpresetKindType = stringIDToTypeID( "presetKindType" );
            var idpresetKindCustom = stringIDToTypeID( "presetKindCustom" );
            desc9.putEnumerated( idpresetKind, idpresetKindType, idpresetKindCustom );
            var idAdjs = charIDToTypeID( "Adjs" );
                var list1 = new ActionList();
                    var desc10 = new ActionDescriptor();
                    var idChnl = charIDToTypeID( "Chnl" );
                        var ref4 = new ActionReference();
                        var idChnl = charIDToTypeID( "Chnl" );
                        var idChnl = charIDToTypeID( "Chnl" );
                        var idRd = charIDToTypeID( "Rd  " );
                        ref4.putEnumerated( idChnl, idChnl, idRd );
                    desc10.putReference( idChnl, ref4 );
                    var idCrv = charIDToTypeID( "Crv " );
                        var list2 = new ActionList();
    // add r points;
    for (var m = 0; m < theArray.length; m++) {
              addCurvePoint (list2, theArray[m], 0)
                    desc10.putList( idCrv, list2 );
                var idCrvA = charIDToTypeID( "CrvA" );
                list1.putObject( idCrvA, desc10 );
                    var desc15 = new ActionDescriptor();
                    var idChnl = charIDToTypeID( "Chnl" );
                        var ref5 = new ActionReference();
                        var idChnl = charIDToTypeID( "Chnl" );
                        var idChnl = charIDToTypeID( "Chnl" );
                        var idGrn = charIDToTypeID( "Grn " );
                        ref5.putEnumerated( idChnl, idChnl, idGrn );
                    desc15.putReference( idChnl, ref5 );
                    var idCrv = charIDToTypeID( "Crv " );
                        var list3 = new ActionList();
    // add g points;
    for (var m = 0; m < theArray.length; m++) {
              addCurvePoint (list3, theArray[m], 2)
                    desc15.putList( idCrv, list3 );
                var idCrvA = charIDToTypeID( "CrvA" );
                list1.putObject( idCrvA, desc15 );
                    var desc20 = new ActionDescriptor();
                    var idChnl = charIDToTypeID( "Chnl" );
                        var ref6 = new ActionReference();
                        var idChnl = charIDToTypeID( "Chnl" );
                        var idChnl = charIDToTypeID( "Chnl" );
                        var idBl = charIDToTypeID( "Bl  " );
                        ref6.putEnumerated( idChnl, idChnl, idBl );
                    desc20.putReference( idChnl, ref6 );
                    var idCrv = charIDToTypeID( "Crv " );
                        var list4 = new ActionList();
    // add b points;
    for (var m = 0; m < theArray.length; m++) {
              addCurvePoint (list4, theArray[m], 4)
                    desc20.putList( idCrv, list4 );
                var idCrvA = charIDToTypeID( "CrvA" );
                list1.putObject( idCrvA, desc20 );
            desc9.putList( idAdjs, list1 );
        var idCrvs = charIDToTypeID( "Crvs" );
        desc8.putObject( idT, idCrvs, desc9 );
    executeAction( idsetd, desc8, DialogModes.NO );
    return app.activeDocument.activeLayer;
    ////// add curve point //////
    function addCurvePoint (theList, valueHor, theNumber) {
    var desc11 = new ActionDescriptor();
    var idHrzn = charIDToTypeID( "Hrzn" );
    desc11.putDouble( idHrzn, valueHor[theNumber] );
    var idVrtc = charIDToTypeID( "Vrtc" );
    desc11.putDouble( idVrtc, valueHor[theNumber+1] );
    var idPnt = charIDToTypeID( "Pnt " );
    theList.putObject( idPnt, desc11 );
    ////// sort a double array, thanks to sam, http://www.rhinocerus.net/forum/lang-javascript/ //////
    function sortArrayByIndexedItem(a,b) {
    var theIndex = 0;
    if (a[theIndex]<b[theIndex]) return -1;
    if (a[theIndex]>b[theIndex]) return 1;
    return 0;

  • Persistent color sampler from cameraraw to XMP

    The samplers created inside cameraraw plugin don't stick between cameraraw sessions, loosing the color values read before to compare afterwards.
    For example, when I open images on photoshop as smart objects using cameraraw and create color samplers, and I re-edit the smart object layer (using cameraraw again) the samplers aren't there any more.
    Some times the new color sampler position isn't same anymore and the reading of the color values change. And that betrays the potential of intelligent objects.
    XMP would assume the position and the color values, and that could be even read later from photoshop script to pass it to the same color sample tool (but this would be another potential addition not regarding the problem here).
    I invite you guys to vote 'Like' on this request, using this link (adobe login):
    http://gsfn.us/t/4m13u

    OK, I may just be having an extraordinarily stupid day, so bear with me..........
    The url's in the previous reply don't work any more - I presume this is because the forums have been reorganized?
    But, beyond that - here's what I RECALL doing in the past.......................
    In my image, create a color sampler point using the color sampler tool.
    Create curve adjustment layer and make that layer the current layer.
    Go back to my image and press ctrl+shift and click on the color sample.
    This would put the rgb values (puts a point on the curve) from the color sample on the red, green, and blue channels of the curves layer.
    After reading the last couple replies, I did the same thing.  And I went "back to my image" and clicked on
    the color sample.  I'm STILL not getting the values on my curve layer......
    What am I missing 'cause this can't be as difficult as I'm making it.........?

  • Unexpected behavior with Color Sampler Tool

    Hi,
    I have a small AppleScript that used the Color Sampler Tool to place two color samples on an image. I am able to read back the (r,g,b) color values for these color samples, but the results in the script do not always match the info windows. It looks like Sample Size is always Point Sample when I read back the values in the script, even if the Sample Size is currently set to something like 11 x 11 Average.
    I am running Photoshop CS3 Extended on a MacBook Pro. A copy of my script is attached to this post.
    Does anyone know of a way to get the script to return the values using specific sample size settings?
    Thank you
    -- Bennett

    Wow, that's too bad. Does anyone have a suggestion on how I can do the following then?
    A. Determine what the current sample size is in the toolbar.
    B. Compute the correct average values using a combination of the position information from the Color Sample and the sample size from A.
    By the way, my eventual goal is to build this functionality into an Automation plug-in, so if you have ideas that are not possible in AppleScript but would work in C/C++ I would be interested in learning about those as well.
    Thanks for your help.
    Cheers
    -- Bennett

  • CS4 - Color Sampler readout with Adjustment Layer selected?

    I'm not sure if this is a setting, or a bug, or the way adobe intended it, but perhaps some of you may know.
    In Photoshop CS4, I have a few color samplers around the stage. I notice that the color readouts require that I make some adjustments using a curves layer. I add the curves adjustment layer and start to make adjustments. The only problem is that while I have an adjustment layer selected (so I can make changes to it) my color sampler readouts in the info panel display blank.
    In previous version of photoshop this was not the case as you could open the adjustment dialog without actually having that adjustment layer selected. I love the new adjustment layer panel, but its really frustrating having to make some changes to an adjustment layer and then select another layer to see what those changes did to the color samplers, and back and forth, and back and forth.
    Does anyone have a fix for this? Is it a bug? Is there a reason that CS4 functions this way?

    I'm not sure if this is a setting, or a bug, or the way adobe intended it, but perhaps some of you may know.
    In Photoshop CS4, I have a few color samplers around the stage. I notice that the color readouts require that I make some adjustments using a curves layer. I add the curves adjustment layer and start to make adjustments. The only problem is that while I have an adjustment layer selected (so I can make changes to it) my color sampler readouts in the info panel display blank.
    In previous version of photoshop this was not the case as you could open the adjustment dialog without actually having that adjustment layer selected. I love the new adjustment layer panel, but its really frustrating having to make some changes to an adjustment layer and then select another layer to see what those changes did to the color samplers, and back and forth, and back and forth.
    Does anyone have a fix for this? Is it a bug? Is there a reason that CS4 functions this way?

  • In Katie's Cafe tutorial, how did she create her color sample?

    In the Adobe Muse tutorial for Katie's Cafe.  How was the color sample created.  She just had us drag it onto our Muse document, but how was the color palette created initially so that it can be used in your Muse document?
    Thanks!

    I think I figured out the solution to the problem people are having.  It has to do with the order that you do things when you try to bring in colors from somewhere else.  If you try to just take colors from somewhere else (ie copy and past them) muse will not recognize them as swatches and even if you take the colors and put them in rectangles in muse and save them to a library muse will still not recognize them as swatches.  What you have to do to create a color set like she did in the tutorial is as follows....
      Copy/Paste your colors into muse
      Make rectangle objects in muse that contain the colors
      Open up the swatches window and click add swatch
      Select one of the colors you added - click ok
      Repeat this process for all the color rectangles you have made
    Now you can use the selection tool to select all the colors you made and create a library with them that will work.
    The issue people seem to be having (and that I myself had) is that when you just copy/paste colors into muse it does not automatically make a swatch for the new color.  When she uses the swatch library in the demo it does add the swatches automatically.  This happens because she went through the process of creating the swatches in muse first (which you are never shown) and not just copy/pasting the colors from some other program.    

  • Color Sample

    Hi,
    How can I remove color sample points in Photoshop CC.  Didn't there used to be a clear button on the toolbar of the eyedropper tool?
    Adrian

    The Clear button is visible when the Color Sampler Tool is selected.

  • Color sampler onto curve layer?

    I believe I knew how to do this but the brain cell that had the information must have died......
    I BELIEVE I used to take the color sampler and put a sample on my image. Then I created a curves layer. AND, by holding some combination of shift/ctrl/alt and clicking the color sample, the values would transfer to the red,green, and blue layers of my curves layer. From there I could make adjustments...
    In CS4 I'm trying to do this, and I can't get it to work... It isn't the same as using the eyedroppers on the curve OR the hand above the eyedroppers. It actually copied the color sample values onto the individual color channels..... How do I do this in CS4?

    OK, I may just be having an extraordinarily stupid day, so bear with me..........
    The url's in the previous reply don't work any more - I presume this is because the forums have been reorganized?
    But, beyond that - here's what I RECALL doing in the past.......................
    In my image, create a color sampler point using the color sampler tool.
    Create curve adjustment layer and make that layer the current layer.
    Go back to my image and press ctrl+shift and click on the color sample.
    This would put the rgb values (puts a point on the curve) from the color sample on the red, green, and blue channels of the curves layer.
    After reading the last couple replies, I did the same thing.  And I went "back to my image" and clicked on
    the color sample.  I'm STILL not getting the values on my curve layer......
    What am I missing 'cause this can't be as difficult as I'm making it.........?

  • Color Matching using Color Sampler Tool?

    Let's say I want to replace a sky in a landscape with a more interesting one with clouds. Is there a way to match the luminosity and hue of the replacement sky to the original landscape by using the color sampler tool? That is, to do the color matching by the number rather than by experimenting with various adjustment layers to get the match?  Thanks!!

    Perhaps you could put the new sky on top with luminosity blend mode. The color of the old sky would show through. But this would invariably require brushing.
    Replace Color is a better option. In the dialog, set the source color (in sky with clouds) at the top. Destination color (sky without clouds) at the bottom.
    Unfortunately this adjustment is not available as an adjustment layer. You'll want to keep the original image, perhaps as an underlying layer, in case you need to go back to it.

  • Color Sampler Tool bug?

    Am I nuts here, or is this something with my particular machine?  I'm running Photoshop CS4 (11.0.1) and I'm seeing the following:
    Create a new image.
    Add a folder.
    Add a mask to that folder (I've done this with a raster mask, not a vector)
    Create an adjustment layer inside that folder (I've tried this with curves, hue/sat, and/or channel mixer).
    Duplicate the folder, and invert the mask on the copy.
    Highlight an adjustment layer (either one).
    Put out a color sampler inside the area masked by the current folder/adjustment layer. This becomes sampler #1.  This shows the current values (correctly).
    Put out a color sampler OUTSIDE the area masked by the current folder/adjustment layer.  This becomes sampler #2.  This shows no values (correctly).
    Highlight the adjustment layer in the second masked folder.
    Both samplers now show no value (incorrect).
    Delete sampler #1.  The new #1 now shows the current values (correct).
    Recreate the other sampler (now at #2).  Sampler #2 does not show color values (correct).
    Highlight the first adjustment layer again.
    Both samplers now show no value (incorrect).
    It appears that *all* color samplers are either using the masked area of sampler #1, or combining the masked area of all lower numbered samplers, to determine if they should calculate values.  The workaround is to remove all samplers every time you switch masked folders (which can get a bit insane if you have a lot of masked folders).  This is not the way it worked in CS3.
    Can anyone else duplicate this issue?  Or is this unique to my machine?  I'm running a fresh install (less than a week old) on Mac OS X 10.5.8, and I've updated to PS 11.0.1.
    Message was edited by: achbed
    Added version information

    Simply put:  Color Samplers will report no information with a Color Adjustment layer selected if it is contained in a masked Group and if the #1 Color Sampler is in the masked region.
    The cursor sampler WILL work however.  Unfortunately, I often need the mouse elsewhere while making adjustments.
    This makes working in masked groups quite bothersome so any help would be appreciated.

  • Color sampler in ActionScript 1

    Hi everyone,
    I am trying to create a color sampler in AS1. The reason why
    I am using AS1 is that I develop for Handhelds Pocket PCs where the
    FP7 is so bad that it cannot be used properly. As a result, our
    only option if FP6 and AS1.
    Basically, I am trying to find a way to get the RGB value
    color from wherever the mouse goes.
    Could someone guide me a little on which solution I should
    use ?
    Thanks

    When you add an adjustment layer, the layer mask is automatically active. You need to activate the pixel (image) layer by clicking on it in the Layers panel.

  • CODE: A simple desktop color sampler and JColorChooser Panel based on it.

    // ColorSamplerColorChooserPanel.java
    import java.awt.BorderLayout;
    import java.awt.Color;
    import java.awt.Font;
    import javax.swing.Icon;
    import javax.swing.JColorChooser;
    import javax.swing.JFrame;
    import javax.swing.UIManager;
    import javax.swing.colorchooser.AbstractColorChooserPanel;
    import javax.swing.event.ChangeEvent;
    import javax.swing.event.ChangeListener;
    * A simple ColorChooserPanel for JColorChooser based on ColorSampler.
    * @author Sandip V. Chitale
    * @version 1.0
    * @see ColorSampler
    public class ColorSamplerColorChooserPanel
         extends AbstractColorChooserPanel
         implements ChangeListener
         private boolean isAdjusting = false;
         private ColorSampler colorSampler;
         public ColorSamplerColorChooserPanel() {
              colorSampler = new ColorSampler();
              colorSampler.addChangeListener(this);
         public void stateChanged(ChangeEvent ce) {
              getColorSelectionModel().
              setSelectedColor(colorSampler.getSelectedColor());
         // Implementation of AbstractColorChooserPanel
         * Return display name.
         * @return a <code>String</code> value
         public String getDisplayName() {
              return "Color Sampler";
         * Update the chooser.
         public void updateChooser() {
    if (!isAdjusting) {
    isAdjusting = true;
                   colorSampler.
                   showColor(getColorSelectionModel().getSelectedColor(), false);
    isAdjusting = false;
         * Build the chooser panel.
         public void buildChooser() {
              setLayout(new BorderLayout());
              add(colorSampler, BorderLayout.NORTH);
         * Return small icon.
         * @return an <code>Icon</code> value
         public Icon getSmallDisplayIcon() {
              return null;
         * Return large icon.
         * @return an <code>Icon</code> value
         public Icon getLargeDisplayIcon() {
              return null;
         * Return font.
         * @return a <code>Font</code> value
         public Font getFont() {
              return null;
         * <code>ColorSampler</code> test.
         * @param args a <code>String[]</code> value
         public static void main(String[] args) {
              try {
                   UIManager.
                   setLookAndFeel(UIManager.getSystemLookAndFeelClassName());
              } catch (Exception e) {
              final JFrame frame = new JFrame("Color Sampler Color Chooser");
              JColorChooser colorChooser = new JColorChooser();
              colorChooser.addChooserPanel(new ColorSamplerColorChooserPanel());
              frame.setContentPane(colorChooser);
              frame.pack();
              frame.setVisible(true);
              frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
    // ColorSampler.java
    import java.awt.AWTException;
    import java.awt.Color;
    import java.awt.Cursor;
    import java.awt.Font;
    import java.awt.Point;
    import java.awt.Robot;
    import java.awt.Toolkit;
    import java.awt.datatransfer.StringSelection;
    import java.awt.event.MouseAdapter;
    import java.awt.event.MouseEvent;
    import java.awt.event.MouseMotionAdapter;
    import javax.swing.BorderFactory;
    import javax.swing.ImageIcon;
    import javax.swing.JFrame;
    import javax.swing.JLabel;
    import javax.swing.JPanel;
    import javax.swing.JTextField;
    import javax.swing.SwingUtilities;
    import javax.swing.BoxLayout;
    import javax.swing.event.ChangeEvent;
    import javax.swing.event.EventListenerList;
    import javax.swing.event.ChangeListener;
    * A simple desktop color sampler. Drag mouse from the color sample
    * label and release mouse anywhere on desktop to sample color at that
    * point. The hex string for the color is also copied to the system
    * clipboard.
    * Note: Uses java.awt.Robot.
    * @author Sandip V. Chitale
    * @version 1.0
    public class ColorSampler extends JPanel {
         private JLabel sampleColorLabel;
         private JLabel colorLabel;
         private JTextField colorValueField;
         private Robot robot;
         * Creates a new <code>ColorSampler</code> instance.
         public ColorSampler() {
              setLayout(new BoxLayout(this, BoxLayout.X_AXIS));
              setBorder(BorderFactory.createEtchedBorder());
              Font font = new Font("Monospaced", Font.PLAIN, 11);
              sampleColorLabel = //new JLabel(new ImageIcon(getClass().getResource("ColorSampler.gif")), JLabel.CENTER);
              new JLabel(" + ", JLabel.CENTER);
              sampleColorLabel.setBorder(BorderFactory.createEtchedBorder());
              sampleColorLabel
              .setToolTipText("<html>Drag mouse to sample the color.<br>" +
                                  "Release to set color and save hex value in clipboard.");
              add(sampleColorLabel);
              colorValueField = new JTextField(9);
              colorValueField.setFont(font);
              colorValueField.setEditable(false);
              colorValueField.setBorder(BorderFactory.createLoweredBevelBorder());
              add(colorValueField);
              colorLabel = new JLabel(" ");
              colorLabel.setFont(font);
              colorLabel.setOpaque(true);
              colorLabel.setBorder(BorderFactory.createEtchedBorder());
              add(colorLabel);
              showColor(colorLabel.getBackground(), false);
              try {
                   robot = new Robot();
              } catch (AWTException e) {
                   System.err.println(e);
              sampleColorLabel.addMouseListener(
                   new MouseAdapter() {
                        public void mousePressed(MouseEvent me) {
                             SwingUtilities.getWindowAncestor(ColorSampler.this)
                             .setCursor(Cursor.getPredefinedCursor(Cursor.CROSSHAIR_CURSOR));
                        public void mouseReleased(MouseEvent me) {
                             Point p = me.getPoint();
                             SwingUtilities.convertPointToScreen(p, me.getComponent());
                             sampleColorAtPoint(p, false);
                             SwingUtilities.getWindowAncestor(ColorSampler.this)
                             .setCursor(Cursor.getDefaultCursor());                         
              sampleColorLabel.addMouseMotionListener(
                   new MouseMotionAdapter() {
                        public void mouseDragged(MouseEvent me) {
                             Point p = me.getPoint();
                             SwingUtilities.convertPointToScreen(p, me.getComponent());
                             sampleColorAtPoint(p, true);
                             SwingUtilities.getWindowAncestor(ColorSampler.this)
                             .setCursor(Cursor.getPredefinedCursor(Cursor.CROSSHAIR_CURSOR));
         public Color getSelectedColor() {
              return colorLabel.getBackground();
         public void setSelectedColor(Color color) {
              if (color.equals(getSelectedColor())) {
                   return;
              showColor(color, false);
         public String getSelectedColorString() {
              return getHexStringOfColor(getSelectedColor());
         public void sampleColorAtPoint(Point p, boolean temporary) {
              showColor(robot.getPixelColor(p.x, p.y), temporary);
         void showColor(Color color, boolean temporary) {
              colorLabel.setBackground(color);
              colorValueField.setText(getHexStringOfColor(color));
              colorValueField.selectAll();
              if (!temporary) {
                   Toolkit.getDefaultToolkit().getSystemClipboard().setContents(
                        new StringSelection(getHexStringOfColor(color)),null);
                   fireStateChanged();
         private String getHexStringOfColor(Color c) {
              int r = c.getRed();
              int g = c.getGreen();
              int b = c.getBlue();
              String rh = Integer.toHexString(r);
              if(rh.length() < 2) {
                   rh = "0" + rh;
              String gh = Integer.toHexString(g);
              if(gh.length() < 2) {
                   gh = "0" + gh;
              String bh = Integer.toHexString(b);
              if(bh.length() < 2) {
                   bh = "0" + bh;
              return ("#"+rh+gh+bh).toUpperCase();
    * Only one <code>ChangeEvent</code> is needed per model instance
    * since the event's only (read-only) state is the source property.
    * The source of events generated here is always "this".
    protected transient ChangeEvent changeEvent = null;
    protected EventListenerList listenerList = new EventListenerList();
    * Adds a <code>ChangeListener</code> to the model.
    * @param l the <code>ChangeListener</code> to be added
    public void addChangeListener(ChangeListener l) {
              listenerList.add(ChangeListener.class, l);
    * Removes a <code>ChangeListener</code> from the model.
    * @param l the <code>ChangeListener</code> to be removed
    public void removeChangeListener(ChangeListener l) {
              listenerList.remove(ChangeListener.class, l);
    * Returns an array of all the <code>ChangeListener</code>s added
    * to this <code>DefaultColorSelectionModel</code> with
    * <code>addChangeListener</code>.
    * @return all of the <code>ChangeListener</code>s added, or an empty
    * array if no listeners have been added
    * @since 1.4
    public ChangeListener[] getChangeListeners() {
    return (ChangeListener[])listenerList.getListeners(
                   ChangeListener.class);
    * Runs each <code>ChangeListener</code>'s
    * <code>stateChanged</code> method.
    * <!-- @see #setRangeProperties //bad link-->
    * @see EventListenerList
    protected void fireStateChanged()
    Object[] listeners = listenerList.getListenerList();
    for (int i = listeners.length - 2; i >= 0; i -=2 ) {
    if (listeners[i] == ChangeListener.class) {
    if (changeEvent == null) {
    changeEvent = new ChangeEvent(this);
    ((ChangeListener)listeners[i+1]).stateChanged(changeEvent);
         * <code>ColorSampler</code> test.
         * @param args a <code>String[]</code> value
         public static void main(String[] args) {
              final JFrame frame = new JFrame("Desktop Color Sampler");
              frame.setContentPane(new ColorSampler
              frame.pack();
              frame.setVisible(true);
              frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
    }

    Hi vg007, what version LabVIEW are you using? I found an example in the NI Example Finder  (LabVIEW 2014) that might be helpful to accomplish what you are trying to do. In LabVIEW navigate to Help >> Find Examples.
    In the Example Finder under the 'Browse' tab go to:
    Analysis, Signal Processing and Mathematics >> Signal Processing >> Edge Detection with 2D Convolution.vi
    Robert S.
    Applications Engineer
    National Instruments
    Attachments:
    Edge Detection with 2D Convolution.vi ‏238 KB

Maybe you are looking for