indesign-scripting-python icon indicating copy to clipboard operation
indesign-scripting-python copied to clipboard

Useful Script: Change Color Swatch Value

Open Lottike opened this issue 4 years ago • 0 comments

""" 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()

Lottike avatar Apr 10 '22 20:04 Lottike