Skip to content

Useful Script: Change Color Swatch Value #14

@Lottike

Description

@Lottike

"""
Changes the value of a color swatch in a specific document.
"""

import win32com.client
import os

app = win32com.client.Dispatch('InDesign.Application.CC.2017')

myInddFile = r'C:\ServerTestFiles\TestDocument.indd'
myDocument = app.Open(myInddFile)

myDocument.colors.item("Color Swatch Name Here").colorValue = [100, 100, 100, 0] # CMYK Value

myDocument.Close()

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions