Finding out brightness of color

Is it possible to find out how bright is an color? I need to find the darkest color in document's swatches. My solution would be to convert (script internally, without actually making any changes in document) swatches to grayscale, compare them and pick the darkest. But how to convert  swatch defined in undefined mode (they might be in lab or cmyk) to grayscale?
I found in 'js scriping reference' a method "convertSampleColor", but I have no idea how to use it. Any examples?

It works. But it took me a while to figure out, that grayscale should be written as GrayScale
var c = new RGBColor();
c.red = 255;
c.green = 255;
c.blue = 0;
var newColor = app.convertSampleColor (ImageColorSpace.RGB, [c.red,c.green,c.blue], ImageColorSpace.GrayScale,ColorConvertPurpose.previewpurpose);
alert(newColor);

Similar Messages

  • Where can I find out more about the little color window that pops up?

    Where can I find out about that color window that pops up when you want to change colors.
    One of my questions is about the saved color squares at the bottom of the little color window. How do you delete those and where are they stored?
    Thanks

    It's the OS X color picker, and it's available in just about all FCS applications - nice because you can store colors once and they are there for all apps. You can't delete a color - just drag white onto it to get rid of it. Oh, and have you dragged down to reveal the large drawer for storing a boatload of colors?

  • How do I find out if a photo in iPhoto is RGB or CMYK color?  How do I change from RGB to CMYK?

    How do I find out if a photo in iPhoto is RGB or CMYK color?  How do I change from RGB to CMYK?

    Open the file with Preview, type Command + i to bring up the Info pane and it's color mode and profile will be listed as shown here:
    To change the color mode to CMYK you'll need a 3rd party image editor like Photoshotp or GraphicConverter to do it.  Why do you need CMYK?
    OT

  • How to find out that an art item has spot color using script?

    Hi all,
    I have a number of art items on a document, some of them are filled with spot colors and some of them are with process color.
    Is there any method by which I can find out which color type(spot or process) is applied to the selected art item?
    Thanx in advance...

    Thanx for the reply carlos....
    But I am not able to use "icolor.typename". There is nothing like "typename" showing in the properties.
    I am using it like this:
    var app:com.adobe.illustrator.Application = Illustrator.app;
                                            var pathArt:PathItem;
                                            var allPaths:PathItems           = doc.pathItems;
                                            if ( app.documents.length > 0 && doc.pathItems.length > 0)
                                                           var colorValue:com.adobe.illustrator.Color;
                                                           //Fill color to the selected object.
                                                           for (var i:int = 0; i < doc.pathItems.length ; ++i)
                                                                          pathArt = allPaths.index(i);
                                                                          if(pathArt.selected)
                                                                                         colorValue = pathArt.fillColor;
                                                                                         trace(colorValue.typename);              //But colorValue doesn't show any property like "typename".
    Do am i missing some thing?
    Thanks...

  • How to find out embedded raster image is Black&White or Color image?

    Is there any possibility to find out the embedded raster image is Black&White, Gray image (or) Color image in "illustrator cs3" without using color mode shown in "document info" pannel. Kindly advice me, the possibilities and solution. And also any scripts avilable for this?
    Thanks.

    Or you could select the embedded image, and open the Window>Document Info panel. Select Embedded Images from the fly out menu on the Document Info panel. This should give you the color mode and more info on the embedded file in question.

  • How to find out the textframe contains "stroke color" (or) "fillcolor"?

    How to find out the textframe contains "stroke color" (or) "fillcolor" via javascript. Kindly advise me with sample.

    I know, this post is quite a while ago, but: This simply does not work for me. Neither for simple PathItems, nor for the characters of a TextFrame.
    Working on: Illustrator CS5.5, Mac OS, Javascript
    Simple example:
    var numSelectedObjects = app.activeDocument.selection.length;
    // If any objects selected: Get fill and stroke color of the first one
    if(numSelectedObjects > 0){
    alert("Fill Color: " + app.activeDocument.selection[0].fillColor + " / Stroke Color: " + app.activeDocument.selection[0].fillColor);
    This returns always CMYKColor, RGBColor or GrayColor, even if there is no Color assigned to the objects stroke or fill!!
    For PathItems there is the attribute ".filled" or ".stroked", which returns "true" or "false" and is reliable.
    if(app.activeDocument.selection[i].filled){ // works fine with PathItems!
    Is there anything similar for Characters? I tried this one, but it does not work (because I think it does not exist):
    if(app.activeDocument.selection[i].textRange.filled){ // does not work!
    I just need to find out, if the characters in a textfield have got a fill or stroke color. Reliable.
    It would be very nice to get help from anybody!
    Thanks a lot in advance!

  • How do you change a brush tool color in Photoshop13. The color chart that has always been on the right side of the screen is gone and I cannot find out how to turn it on

    How do you change a brush tool color in Photoshop13. The color chart that has always been on the right side of the screen is gone and I cannot find out how to turn it on

    I now have the pallete on the right side of my screen. But, I am unable to change the color of the brush. I move the eye dropper over red and click on it. A panel comes saying 'Pure Red', I click ok but the brush color does not change.
    David Miller
    [email protected]

  • How can I find out which color toner in my Officejet 6700 is out?

    My printer stopped printing on a print job, and said replace a color cartridge to continue.  However, there are 4 cartridges and I was not told which one to replace.  Is there any way to get that information from the printer?

    Hi,
    You may tap the Ink Levels indicator at the top of the printer front panel to find out which ink cartridge is low:
    On the printer control panel, touch the Ink Level icon ().
    A graphic of the estimated ink levels for each cartridge displays on the control panel.
    Figure : Estimated ink levels displayed on the printer control panel
    Regrds,
    Shlomi
    Say thanks by clicking the Kudos thumb up in the post.
    If my post resolve your problem please mark it as an Accepted Solution

  • How to make preflight profile witch find out if exist in document spot color with name "CutContour", if not show allert,  I try many combinations but nothing works

    How to make preflight profile witch find out if exist in document spot color with name "CutContour", if not show allert,  I try many combinations but nothing works

    Thanks very much for your help, but I'm still overlooking something. I double checked to make sure that I did not have a hidden .txt file extention. I then decided to abandon the lock on preferences idea until I get it working. I converted my mozilla.cfg file back to plain text. I made sure I do not have an extra blank line at the end of each file. The syntax looks good, as far as I can tell. I'll copy and paste what I have so far. Did I have the file locations correct posted above? Also, if you feel i can delete some lines of text in my mozilla.cfg file I'll be happy to do so.
    mozilla.cfg
    <pre><nowiki>//
    pref("privacy.sanitize.sanitizeOnShutdown", true);
    pref("privacy.sanitize.promptOnSanitize", false);
    pref("browser.rights.override", true);
    pref(“app.update.auto”, false);
    pref(“extensions.blocklist.enabled”, false);
    pref(“extensions.shownselectionUI”, true);
    pref(“browser.shell.checkDefaultBrowser”, false);
    pref(“toolkit.telemetry.enabled”, false);
    pref(“toolkit.telemetry.prompted”, 2);
    pref(“toolkit.telemetry.rejected”, true);
    pref(“app.update.auto”, false);
    pref(“browser.download.useDownloadDir”, true);
    pref(“browser.search.update”, false);
    pref(“signon.autofillForms”, false);
    pref(“signon.rememberSignons”, false);
    pref(“browser.download.manager.scanWhenDone”, true);
    pref(“browser.formfill.enable”, false);
    pref(“xpinstall.enabled”, true);</nowiki></pre>
    channel-prefs.js
    pref("app.update.channel", "release");
    override.ini
    [XRE]
    EnableProfileMigrator=false
    all-lmc.js
    pref("general.config.filename", "mozilla.cfg");
    defaultPref("browser.startup.homepage", "data:text/plain,browser.startup.homepage=http://bbc.co.uk");
    Again, thank you very much for your time. Do I create my own browserconfig.properties, and firefox.js? Also, I forgot to mention I'm running Windows 8.

  • Evening Out The Brightness and Color of a Set of Images

    So I have a set of images, usually between 500-700, all taken in a 20min period or so. Natural light through a window. It's shot handheld with my Canon rebel with a 18-55mm lens. Due to the slight change in light over the time period, the fact I'm zooming in and out, and moving around the subject, I get a lot of value and color variation. See the images below...
    My current process is to manually color correct each image so they match in terms of brightness and color. This gets very tedious of course. Could someone suggest a faster, preferably completely automated way to even out the brightness and colors of a set of images like these in lightroom so they all look pretty similar to each other?
    Thanks for any help!
    - Neil

    Hi léonie,
    >> One problem - it is not only the different color of the light because of the setting sun.
    >> Your Harry and Harold are receiving the sun light from different directions. Harold is
    >> facing away from the sun and the light in the shadows is much bluer. I doubt you will
    >> be able to "Lift&Stamp" the adjustment between these two groups of images without
    >> fine tuning it. The "shady" Harold will need additional color correction to turn the bluish
    >> shadows into sunlight, because the shadow regions need contrast stretching and
    >> more vibrancy as well.
    Yup, that's one reason I think I need a color correction after the fact method to handle this situation, obviously taking a shot that's mostly in shadow will look different than one where the character is almost all in complete sunlight.
    I guess I'm really having three issues here, first is the blue tint that gets introduced when I zoom in, and then second is the natural lightening and darkening that occurs as I take photos of the subject from different angles, and third is the fact since its sunlight the light does change somewhat over the 20minute period.
    Hopefully the first issue can be solved by turning off automatic white balance, and I'm still hoping there may be some automated method for evening out the value difference introduced by the 2nd and third issue. Although even if I can just solve the first issue that would save me a ton of time.
    Thanks for the info so far.
    - Neil

  • How to find out color numbers

    Hey everyone
    Just wondering how to find out the color number codes in iweb?
    Thanks
    Bevan

    Bevan are you talking about the Hex values? Like #3C3C3C?
    I have to know those values as well when I'm creating stuff in Photoshop. I use Art Director's Took Kit to do that. I use the magnifying glass to capture the color from iWeb and then copy the hex value it gives me.
    I'm not sure if iWeb's color picker gives hex values - haven't found it yet if it does. But that's how I do it. Art Director's Tool Kit came with my Mac so you should have it as well.

  • HT201232 My I phone is restart after some time. Some times find out its off then if I press Home   Power button then again re-start. Some time after coming apple logo it take auto restart ...display become blue color.

    My I phone is restart after some time. Some times find out its off then if I press Home + Power button then again re-start. Some time after coming apple logo it take auto restart ...display become blue color. I have restored through I tunes and got I cloud backup. But stll have same problem.

    Try once again to restore using iTunes, but this time without using a backup, to make sure that this is not software related.
    If the phone still restarts on it's own, get it checked, this might then be hardware related after all.
    Use iTunes to restore your iOS device to factory settings - Apple Support

  • UITableView section header: How to find out font size and background color

    Hi, does anyone know how to find out the default font and default background color(or image?) used in the section header of a tableView
    I'd like to create a view with the same background color/image and use the same font (with different color) used by the section header

    I don't think there are any getter methods for a section header. But I wouldn't be surprised if the header was an object. You might try setting some header text to a key string and searching recursively through all the subviews for objects that respond to a text message. It might help to also print the description of objects that don't respond to text. I haven't tried this yet, but will let you know if I get any useful results.
    I guess another approach would be to use viewForHeaderInSection to set the font and color to whatever you wanted. Then you wouldn't have any problem matching it.

  • How to to find out if the objects used "Registration" color or not?

    Is it possible to find out if the objects used "Registration" color or not via scripting? Kindly advise me.
    Thanks for looking into this.

    Hi,
    May be you might read this post
    http://forums.adobe.com/thread/623432?tstart=0
    ciao , art.chrome

  • PSE 7 bright vivid colors, doesn't match prints

    I tried searching for a thread to answer this question but I could not find something that really helped specifically.
    Use PSE7 to edit my jpg's and when I'm happy with the results then go to print, my prints do not match what I created on screen.  The colors are much darker, the rich greens in my landscapes are dull with a dark tint..overall, quite disappointing.
    I use a Spyder 3 pro to calibrate my monitor and use that profile as the printing profile for PSE7.  I shoot a Canon 40d in sRGB.  My monitor and printer (Canon MP600) are set to use the profile created by the Spyder 3 Pro software.
    When I use Canon Digital Photo Pro to edit raw images, the colors on screen are consistent with what I get printed on my Canon MP600.  The main difference here is that Canon DPP allows you to select the profile for image display and for printing.
    Does PSE7 allow you to somehow select from your list of available profiles what color profile to be used for display?  Out of the color management options, I've tried to use the "Optimize for display" and "Optimize for printing" options..."no color management" and "let me choose.." still no difference in the prints vs. the screen.
    If I take a file that I printed in Canon DPP, where the colors on screen match what is printed, and then open that same file in PSE7, the colors on screen are much different...they are much brighter and vivid than what I see in Canon DPP.
    All I can do in Canon DPP is edit raw files and do the basic color editing...Obviously, PSE7 has many more features and plugins that are useful so I'd like to work in that program and print from there.
    If I do all my editing of a file in PSE7 until I'm happy, my prints still won't match what I see in PSE7.  If I take that file and open it in Canon DPP, the colors are different, but they match what came out of the printer, albeit...darker and not vivid

    Thanks..that did the trick.  I feel like a big dummy now
    I got the explanation of the printer/paper profiles for my printer on the Canon website.
    The prints are MUCH closer...the only difference I can tell now is eliminated when I use a good light to view my prints, when held up to a good light or sunlight, the prints are very true to what I see on the screen.
    thanks

Maybe you are looking for