photopea / photopea

Photopea is online image editor
https://www.Photopea.com
7.34k stars 263 forks source link

Scripting: How to access background fill via script #7051

Open architagrawal-fg opened 1 month ago

architagrawal-fg commented 1 month ago

Hi, Thanks a lot for this amazing tool... Quick noob question...

How can I access the background color of artboard in script?

Example: I can see this color in UI image

Here is a example PSD: https://fuegocreativestorage.blob.core.windows.net/tmp/photopea-fig.psd

photopea commented 1 month ago

Could you figure out if it is possible in a script in Adobe Photoshop? We want to have the same scripting interface as Photoshop has.

architagrawal-fg commented 1 month ago

Wow.. thanks for quick respone...

The best I could find is: https://community.adobe.com/t5/photoshop-ecosystem-discussions/setting-artboard-background-to-transparent/m-p/12438432#M588224 To set up background color

And to access current artboard background color: https://github.com/adobe-photoshop/generator-core/issues/377

Didn't found any direct way to access/change the color in artboard background color.

Sorry don't have Adobe Photoshop installed to test out the script... I completely use photopea :)

architagrawal-fg commented 1 month ago

image

Also when experimenting.... I found there is a isBackgroundLayer flag for artlayer... when I tried on photopea... it returned "bgrd" string for all the layers. Is this expected behaviour ?

architagrawal-fg commented 1 week ago

Any updates on this on @photopea

photopea commented 1 week ago

Hi, it should be fixed now. "isBackgroundLayer" should return a boolean value now.