If this can be done, it would be through scripting. You should ask over in the scripting forum: InDesign Scripting
I would define a new style for each chapter (you can base the styles off a single base style changing only the character color in the definition), then use the script to assign the correct style based on the chapter number, but I'd wait to decide on how to name these styles until you get some input from the scripters.
Thank you Peter.
I would define a new style for each chapter
That´s what I did...
Unfortunately I´ve no experience with scripting yet. But I bought a book ("InDesign automatization"), still need time to learn ...
If you ask over in the scripting forum they will give you lots of help.
If I understand well … It seems to me that it could be done with 1 click!
Of course, you would need Multi-Find/Change of Martinho do Gloria!
1/ Just use "color" conditions to mark the text (not necessarily only the titles): Chaper in red: apply the "red" condition, …
2/ Use a "specific" color named "x" for all the titles.
3/ Create simple researches as : search "red" condition + color "x" and replace by "red" color, …
4/ Place all the regex in a MFC set.
Have you thought about setting up a Book with the chapters as separate layout files? In that case the color swatch for the headline in each chapter file could have a different definition but with the same name. You would have to turn off color swatches in the syncing options.
@rob day --> my document is much too small for making a book and some chapters have only one sheet.
@obi-wan Kenobi --> I will think about buying that MFC-stuff, but not yet
By now I solved my problem with four sample pages and four paragraph styles for each color/chapter. It´s not the smartest solution, but it works well.
thanks guys for your hints.