indesign-scripting-python
indesign-scripting-python copied to clipboard
Useful Script: Change Color Swatch Value
""" 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()