Exit
  • Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
0

How can I convert color into this format

Enthusiast ,
Feb 26, 2025 Feb 26, 2025

Copy link to clipboard

Copied

Hi,

 

I know very little about photoshop. Is there any way I can convert my original artwork into this black and white format? I drew it in RGB, but I find this 'red' channel  very cute. I want my artwork to be saved and later to be animated maintaining this black and white shade. I tried saving my art work by only keeping the red option ON but when I open the psd file it goes back into RGB. 

 

can anyone help me. Thank you.

original workoriginal workexpand imageI want each to be converted like thisI want each to be converted like thisexpand image 

TOPICS
Windows

Views

259
Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines

correct answers 1 Correct answer

Community Expert , Feb 27, 2025 Feb 27, 2025
quote

Thank you so much. I will try it. I am grateful  to you for this post link. 


By Suraiya A

 

You're welcome!

 

Here is a custom script for you, no adjustment layer is necessary, the grayscale conversion will use the red channel. Updated to a 1.1 version using smart objects/smart filters.

 

Press "Yes" to process ALL layers or "No" to process only the selected/active layers.

 

Note: Locked layers are skipped, although that is easily changed if you wish for the script to automatically unlock the

...

Votes

Translate
Adobe
Adobe Employee ,
Feb 26, 2025 Feb 26, 2025

Copy link to clipboard

Copied

Hi there @Suraiya A!

One way to do that is by creating a Black & White Adjustment Layer. You can find out how to do that here: https://adobe.ly/4kh9CUo

Hope this helps!

Best, Alek 😊

Votes

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Enthusiast ,
Feb 26, 2025 Feb 26, 2025

Copy link to clipboard

Copied

Hi,

 

It dsnt help. I will animate the fruits. adjustment layers dsnt move when I move the fruits in AE= after effects  or do I have to copy AL= adjustment layers for each individual fruits ?  Do you know after effects also?  If yes, then I hope you will get what I meant. But thank you so much. I learned a new thing today. Thank you 

Kindly see the attached file.

 

 

Votes

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Feb 26, 2025 Feb 26, 2025

Copy link to clipboard

Copied

I am guessing that you spotted that can adjust the tonal value for each colour with the B&W adjustment layer?

If you click on the tiny hand icon, then you can drag the cursor left and right on an object, and affect its colour directly.

image.pngexpand image

 

When you are happy, you can create a copy merged layer (Shift Ctrl Alt E) and animate that layer.

 

Votes

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Enthusiast ,
Feb 26, 2025 Feb 26, 2025

Copy link to clipboard

Copied

Hello, Thank you so much. I dnt want to merge layers. I want all those layers to be in the same shade as it is in R channel only. I cant animate layers in after effects with a adjustment layer above them. I think I have to apply grayscale mode. Thank you so much for your kind reply. 

Votes

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Feb 26, 2025 Feb 26, 2025

Copy link to clipboard

Copied


Suraiya A wrote:

Hello, Thank you so much. I dnt want to merge layers. I want all those layers to be in the same shade as it is in R channel only. I cant animate layers in after effects with a adjustment layer above them. I think I have to apply grayscale mode. Thank you so much for your kind reply. 


 

Using an adjustment layer such as the  channel mixer, a script can apply the adjustment layer to all layers, retaining the individual layers (work on a duplicate in case you need to go back to the colour version):

 

Votes

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Enthusiast ,
Feb 27, 2025 Feb 27, 2025

Copy link to clipboard

Copied

Thank you so much. I will try it. I am grateful  to you for this post link. 

Votes

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Feb 27, 2025 Feb 27, 2025

Copy link to clipboard

Copied

quote

Thank you so much. I will try it. I am grateful  to you for this post link. 


By Suraiya A

 

You're welcome!

 

Here is a custom script for you, no adjustment layer is necessary, the grayscale conversion will use the red channel. Updated to a 1.1 version using smart objects/smart filters.

 

Press "Yes" to process ALL layers or "No" to process only the selected/active layers.

 

Note: Locked layers are skipped, although that is easily changed if you wish for the script to automatically unlock them.

 

/*
Layers to Gray Based on Red Channel.jsx
Stephen Marsh
v1.0 - 27th February 2025
v1.1 - Adds a smart object / smart filter for lossless conversion of colour to gray
https://community.adobe.com/t5/photoshop-ecosystem-discussions/how-can-i-convert-color-into-this-format/td-p/15179655
Note: Locked layers are skipped
*/

#target photoshop

// Ensure a document is open
if (app.documents.length > 0) {

    if (app.activeDocument.mode == DocumentMode.RGB) {

        // Single history stage undo
        activeDocument.suspendHistory("Undo Script", "main()");


        function main() {

            // Layer selection logic
            if (confirm("Process all layers (Yes), or only process the selected layers (No)?", false)) {
                selectAllLayers();
            }

            // Capture the initial layer visibility and layer selection
            var currentLayersState = getLayersVisiblity();

            // Get the selected layers: courtesy of jazz-y
            var s2t = stringIDToTypeID;
            (r = new ActionReference()).putProperty(s2t('property'), p = s2t('targetLayersIDs'));
            r.putEnumerated(s2t('document'), s2t('ordinal'), s2t('targetEnum'));
            var lrs = executeActionGet(r).getList(p),
                sel = new ActionReference();

            // Loop over the selected layers: courtesy of jazz-y
            for (var l = 0; l < lrs.count; l++) {
                sel.putIdentifier(s2t('layer'), p = lrs.getReference(l).getIdentifier(s2t('layerID')));
                (r = new ActionReference()).putIdentifier(s2t('layer'), p);
                (d = new ActionDescriptor()).putReference(s2t("target"), r);
                //d.putBoolean(s2t("makeVisible"), false);
                executeAction(s2t('select'), d, DialogModes.NO);

                // Check if the layer is locked
                if (isLayerLocked()) {
                    //app.activeDocument.activeLayer.allLocked = false; // Unlock the layer
                    continue; // Skip processing this layer if it is locked
                }

                // Create a new embedded smart object from the selected layers
                executeAction(stringIDToTypeID("newPlacedLayer"), undefined, DialogModes.NO);

                // Process the active layer
                channelMixer();
            }

            // Restore the initial layer visibility and selection
            setLayersVisiblity(currentLayersState);
        }

    } else {
        alert("The document must be RGB mode!");
    }

} else {
    alert("A document must be open!");
}


///// Functions /////

function selectAllLayers(ignoreBackground) {
    // Should be pretty snappy since it uses the native 'Select > All Layers' method and then adds background layer if it exists.
    // selectAllLayers(true); // Ignores background layer

    // Select all layers (doesn't include Background)
    try {
        var desc = new ActionDescriptor();
        var ref = new ActionReference();
        ref.putEnumerated(charIDToTypeID('Lyr '), charIDToTypeID('Ordn'), charIDToTypeID('Trgt'));
        desc.putReference(charIDToTypeID('null'), ref);
        executeAction(stringIDToTypeID('selectAllLayers'), desc, DialogModes.NO);
    } catch (e) { }

    if (!ignoreBackground) {
        // Add Background Layer to the selection (if it exists)
        try {
            activeDocument.backgroundLayer;
            var bgID = activeDocument.backgroundLayer.id;
            var ref = new ActionReference();
            var desc = new ActionDescriptor();
            ref.putIdentifier(charIDToTypeID('Lyr '), bgID);
            desc.putReference(charIDToTypeID('null'), ref);
            desc.putEnumerated(stringIDToTypeID('selectionModifier'), stringIDToTypeID('selectionModifierType'), stringIDToTypeID('addToSelection'));
            desc.putBoolean(charIDToTypeID('MkVs'), false);
            executeAction(charIDToTypeID('slct'), desc, DialogModes.NO);
        } catch (e) { }
    }
}

function channelMixer() {
    var s2t = function (s) {
        return app.stringIDToTypeID(s);
    };
    var descriptor = new ActionDescriptor();
    var descriptor2 = new ActionDescriptor();
    descriptor.putEnumerated(s2t("presetKind"), s2t("presetKindType"), s2t("presetKindCustom"));
    descriptor.putBoolean(s2t("monochromatic"), true);
    descriptor2.putUnitDouble(s2t("red"), s2t("percentUnit"), 100);
    descriptor.putObject(s2t("gray"), s2t("channelMatrix"), descriptor2);
    executeAction(s2t("channelMixer"), descriptor, DialogModes.NO);
}

function getLayersVisiblity() {
    // by jazz-y
    var s2t = stringIDToTypeID,
        t2s = typeIDToStringID;
    (r = new ActionReference()).putProperty(s2t('property'), p = s2t('targetLayersIDs'));
    r.putEnumerated(s2t('document'), s2t('ordinal'), s2t('targetEnum'));
    var targetLayers = executeActionGet(r).getList(p),
        seletion = [],
        visiblity = {};

    for (var i = 0; i < targetLayers.count; i++) seletion.push(targetLayers.getReference(i).getIdentifier());
    (r = new ActionReference()).putProperty(s2t('property'), p = s2t('numberOfLayers'));
    r.putEnumerated(s2t('document'), s2t('ordinal'), s2t('targetEnum'));
    var len = executeActionGet(r).getInteger(p);

    for (var j = 1; j <= len; j++) {
        (r = new ActionReference()).putProperty(s2t('property'), p = s2t('layerSection'));
        r.putIndex(s2t('layer'), j);
        if (t2s(executeActionGet(r).getEnumerationValue(p)) == 'layerSectionEnd') continue;
        (r = new ActionReference()).putProperty(s2t('property'), p = s2t('layerID'));
        r.putIndex(s2t('layer'), j);
        var id = executeActionGet(r).getInteger(p);
        (r = new ActionReference()).putProperty(s2t('property'), p = s2t('visible'));
        r.putIndex(s2t('layer'), j);
        var visible = executeActionGet(r).getBoolean(p);
        visiblity[id] = visible;
    }
    return {
        selection: seletion,
        visiblity: visiblity
    };
}

function setLayersVisiblity(layersStateObject) {
    // by jazz-y
    var s2t = stringIDToTypeID;
    for (var a in layersStateObject.visiblity) {
        makeVisible = layersStateObject.visiblity[a] ? "show" : "hide";
        (r = new ActionReference()).putIdentifier(s2t('layer'), a);
        (d = new ActionDescriptor()).putReference(s2t('target'), r);
        executeAction(s2t(makeVisible), d, DialogModes.NO);
    }
    if (layersStateObject.selection.length) {
        var r = new ActionReference();
        for (var i = 0; i < layersStateObject.selection.length; i++)
            r.putIdentifier(s2t("layer"), layersStateObject.selection[i]);
        (d = new ActionDescriptor()).putReference(s2t("target"), r);
        d.putBoolean(s2t("makeVisible"), false);
        executeAction(s2t("select"), d, DialogModes.NO);
    } else {
        (r = new ActionReference()).putEnumerated(s2t("layer"), s2t('ordinal'), s2t('targetEnum'));
        (d = new ActionDescriptor()).putReference(s2t('target'), r);
        executeAction(s2t('selectNoLayers'), d, DialogModes.NO);
    }
}

function isLayerLocked() {
    var s2t = stringIDToTypeID;
    var ref = new ActionReference();
    ref.putProperty(s2t('property'), s2t('layerLocking'));
    ref.putEnumerated(s2t('layer'), s2t('ordinal'), s2t('targetEnum'));
    var desc = executeActionGet(ref).getObjectValue(s2t('layerLocking'));
    return desc.getBoolean(s2t('protectAll')) || desc.getBoolean(s2t('protectComposite'));
}

 

  1. Copy the code text to the clipboard
  2. Open a new blank file in a plain-text editor (not in a word processor)
  3. Paste the code in
  4. Save as a plain text format file – .txt
  5. Rename the saved file extension from .txt to .jsx
  6. Install or browse to the .jsx file to run (see below)

https://prepression.blogspot.com/2017/11/downloading-and-installing-adobe-scripts.html

Votes

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Feb 27, 2025 Feb 27, 2025

Copy link to clipboard

Copied

quote

I drew it in RGB, but I find this 'red' channel  very cute. I want my artwork to be saved and later to be animated maintaining this black and white shade. I tried saving my art work by only keeping the red option ON but when I open the psd file it goes back into RGB. 

By Suraiya A

 

The reason that didn’t work is that changing the visibility of channels is only a change to the view settings, not to the file itself. It still has all of the channels even though you are only viewing one of them.

 

If you like the red channel, then you can throw out the other channels and only keep the red channel, as shown in the demo below. These are the simple steps I used: 

1. In the Channels panel, select the channels you no longer want. I selected Green and Blue. 

2. In the Channels panel, click the Delete button (trash can) button. 

3. With the other channels deleted, it is no longer an RGB image, it’s now a Multichannel image. But Multichannel images aren‘t supported in all software, so it’s a good idea to convert it to Grayscale. Choose the command Image > Mode > Grayscale.

4. Save or export a copy of the file in whatever format you need. 

 

Edit: Oh, do you need to animate each layer separately? If you do, my method won’t work because it will flatten the file, so we’ll have to find another way.

 

Photoshop keep only red channel.gifexpand image

Votes

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Feb 27, 2025 Feb 27, 2025

Copy link to clipboard

Copied

quote
Edit: Oh, do you need to animate each layer separately? If you do, my method won’t work because it will flatten the file, so we’ll have to find another way.

 

 

By Conrad_C

 

The script that I created for @Suraiya A will cycle over all or selected unlocked layers and convert them to a smart object and apply a R=100% monochromatic channel mixer. It's easy enough to remove the smart object line of code to simplify the file if working on a copy of the original.

Votes

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Enthusiast ,
Feb 27, 2025 Feb 27, 2025

Copy link to clipboard

Copied

Hi, Thank you so much for this kindness. I run the script. I am getting an eror. Kindly take a look please. I am using photoshop 23.

 

r channel.gifexpand image

 

 

Votes

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Enthusiast ,
Feb 27, 2025 Feb 27, 2025

Copy link to clipboard

Copied

I had to reduce color option for screen record to GIF. otherwise file size gets bigger, cant upload in Adobe community.

Votes

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Enthusiast ,
Feb 27, 2025 Feb 27, 2025

Copy link to clipboard

Copied

The error am gettingThe error am gettingexpand image

Votes

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Enthusiast ,
Feb 27, 2025 Feb 27, 2025

Copy link to clipboard

Copied

 

 

Yess!!!! 😄  it worked perfectly in after effects and I can animate individually all the layers now! I am so happy!!! 😄 Thank you. 

 

 

Worked perfectly in AEWorked perfectly in AEexpand image

Votes

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Feb 28, 2025 Feb 28, 2025

Copy link to clipboard

Copied

quote

Hi, Thank you so much for this kindness. I run the script. I am getting an eror. Kindly take a look please. I am using photoshop 23.

 

r channel.gifexpand image

 

 


By Suraiya A

 

 

That looks like a visibility issue with the code in your version, I think that I created and tested in Photoshop 2021. Apart from that error, it did make all of the unlocked layers gray based on the red channel content didn't it?

Votes

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Enthusiast ,
Feb 28, 2025 Feb 28, 2025

Copy link to clipboard

Copied

Yes, yes it did.

Votes

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Feb 28, 2025 Feb 28, 2025

Copy link to clipboard

Copied

quote

Yes, yes it did.


By Suraiya A


Then please mark my reply with the code as a correct answer.

 

You can either add double forward slashes // to the beginning of that line to "comment out" and disable the line of code that is erroring, or just delete that line of code.

Votes

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Enthusiast ,
Feb 28, 2025 Feb 28, 2025

Copy link to clipboard

Copied

Done. Thank you so much for everything.  

Votes

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Feb 28, 2025 Feb 28, 2025

Copy link to clipboard

Copied

LATEST
quote

Done. Thank you so much for everything.  


By Suraiya A

 

Thank you and you're welecome!

Votes

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines