UXP Toolkit
    Preparing search index...

    Interface PixelLayerCreateOptions

    An object literal can be constructed with any of the following properties and passed to Document.createLayer. As a type, PixelLayerCreateOptions can be used in Typescript development.

    const options = { name: "myLayer", opacity: 80, blendMode: constants.BlendMode.COLORDODGE };
    await require('photoshop').app.activeDocument.createLayer(options);

    objects/createoptions

    22.5

    interface PixelLayerCreateOptions {
        blendMode?: BlendMode;
        color?: LabelColors;
        fillNeutral?: boolean;
        group?: boolean;
        mode?: BlendMode;
        name?: string;
        opacity?: number;
    }

    Hierarchy

    • LayerCreateOptionsBase
      • PixelLayerCreateOptions
    Index

    Properties

    blendMode?: BlendMode

    Blend mode of the newly created layer or group.

    NORMAL
    

    22.5

    color?: LabelColors

    Label color of the newly created layer or group.

    NONE
    

    22.5

    fillNeutral?: boolean

    Whether to fill the layer with a neutral color when applying Blend Mode.

    false
    

    22.5

    group?: boolean

    Whether to use previous layer to create clipping mask.

    false
    

    22.5

    mode?: BlendMode

    Deprecated, please use blendMode above as it will override this value.

    NORMAL
    

    22.5

    name?: string

    Name of the newly created layer. If no value is provided, then a name will be generated following the template, "Layer #".

    -
    

    22.5

    opacity?: number

    Opacity of the newly created layer or group.

    100
    

    22.5