Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Useful Script: Change Color Swatch Value #14

Open
Lottike opened this issue Apr 10, 2022 · 0 comments
Open

Useful Script: Change Color Swatch Value #14

Lottike opened this issue Apr 10, 2022 · 0 comments

Comments

@Lottike
Copy link

Lottike commented Apr 10, 2022

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant