Get Layers by Color Using JavaScript in Photoshop

Discussion of Photoshop Scripting, Photoshop Actions and Photoshop Automation in General

Moderators: Tom, Kukurykus

lylybrown
Posts: 1
Joined: Mon Dec 22, 2025 2:35 pm
Location: https://infinitecraft-game.io

Get Layers by Color Using JavaScript in Photoshop

Post by lylybrown »

Hi everyone,
I’m trying to write a Photoshop script using JavaScript to automatically get all layers with a specific color (for example, red) and store their names in an array. I’ve tried using artLayers but I’m not sure how to check a layer’s fill color or color label. Has anyone done this before? What’s the best approach for this in Photoshop scripting?