Manchmal geht probieren über studieren. Zum Beispiel wenn man eine neue Sonderfarbe mit Euroskala-Farben überdrucken möchte. Zwar gibt es am Bildschirm eine „Überdruck simulieren“ Funktion, jedoch ist diese nicht zuverlässig (das kann verschiedene Gründe haben, z.B. ein zu kleiner Farbraum des Bildschirms). Auch ein Digitalproof kann nur bedingt das tatsächliche Druckergebnis simulieren (auch hier kann der Farbraum zu klein sein). Sonderfarben verhalten sich manchmal im Überdruck mit anderen Farben ganz anders als erwartet (durch Rückspaltung usw.)
Es gibt also Situationen, in denen man um einen Probedruck nicht herum kommt. Praktisch wäre eine Farbtafel, die alle Nuancen der Sonderfarbe im Überdruck mit den Euroskala-Farben enthält. Solch eine Farbtafel kann man natürlich manuell mit z.B. InDesign herstellen. Das ist aber mühsam und langweilig.
Spannender und weitaus produktiver wirds mit einem InDesign-Script. InDesign versteht zwei Scriptsprachen: AppleScript und Javascript. Ich nutze Javascript aus Gründen (vor allem, weil ich keine teuren Äpfel mag).
Das Script erzeugt ein neues Dokument und erstellt Seiten im Format 21x21cm und plaziert darauf die Testfelder. Pro Feld wird ein neues Farbfeld angelegt. Pro Sonderfarb-Abstufung muss zusätzlich ein Tint erstellt werden und das Atrribut „Fläche überdrucken“ auf das Rechteck angewendet werden.
Nach wenigen Sekunden zeigt InDesign die fertige Farbtafel an:

Das ist der Quellcode zum Erzeugen der Tafel, das Script im InDesign Scripting-Panel ablegen:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 |
/** * Farbtafeln erstellen * change variables below according to your needs */ main(); function main (){ // define page size in mm var pw = 210; var ph = 210; // define number of boxes in x and y direction var num_row = 21; var num_col = 21; var stepX = (pw-10) / num_col; // size of one box, less 5mm page margin var stepY = (ph-10) / num_row; // create document var doc = app.documents.add({ documentPreferences:{ pageHeight:ph, pageWidth:pw, facingPages:false // for simplicity don´t create facing pages } }); var pg = doc.pages.item(0); // get the page // define initial coordinates for first box var x1 = stepX / 2.0; var y1 = stepY / 2.0; var x2 = x1 + stepX; var y2 = y1 + stepY; // define colors and paperwhite var cyan = 0; var magenta = 0; var yellow = 0; var black = 0; var paper = color_add (doc, "paper color ["+0+";"+0+";"+0+";"+0+"]", ColorModel.PROCESS, [0, 0, 0, 0]); // define spot color var special =doc.colors.add(); special.properties = { name:"AndiGun Spezialtoner", model:ColorModel.SPOT, space:ColorSpace.CMYK, colorValue:[0,0,100,0] // alternate color is 100% yellow }; // define text color var text =doc.colors.add(); text.properties = { name:"Text", model:ColorModel.PROCESS, space:ColorSpace.CMYK, colorValue:[0,0,0,100] // 100% black }; // start procedure for (var i = 0; i < num_col; i++) { // for each column for (var j = num_row-1; j >= 0; j--) { // for each row // adjust as needed cyan = (j*5); magenta = (i*5); //black = j*5; var color_name = "cmyk color ["+cyan+";"+magenta+";"+yellow+";"+black+"]"; if (i == 0) { var newTextFrame = pg.textFrames.add(); newTextFrame.contents = cyan+""; newTextFrame.textFramePreferences.verticalJustification = VerticalJustification.CENTER_ALIGN; var myText = newTextFrame.parentStory.paragraphs.item(0); myText.pointSize = 8; myText.justification = Justification.CENTER_ALIGN; newTextFrame.geometricBounds = [0, x1 , stepY/2, x2]; // Top, Left, Bottom, Right } var color = color_add (doc, color_name, ColorModel.PROCESS, [cyan, magenta, yellow, black]); var rect = pg.rectangles.add({geometricBounds:[y1,x1,y2,x2]}); rect.fillColor = color; rect.strokeWeight = 1; rect.strokeColor = paper; x1 = x2; x2 = x2 + stepX; } // end of row y1 = y2; y2 = y2 + stepY; x1 = stepX / 2.0; x2 = x1 + stepX; } // end of columns var tint = 0; x1 = stepX / 2; y1 = stepY / 2; x2 = x1 + stepX; y2 = y1 + stepY; // create array of tints for special color var tints = Array(); for (var i = 1; i < num_col-1; i++) { var specialTint = doc.tints.add (special); specialTint.tintValue = i * 5; tints[i] = specialTint; } for (var i = 0; i < num_col; i++) { for (var j = num_row-1; j >= 0; j--) { tint = i*5; if (j == 0) { var newTextFrame = pg.textFrames.add(); newTextFrame.contents = tint+""; newTextFrame.textFramePreferences.verticalJustification = VerticalJustification.CENTER_ALIGN; var myText = newTextFrame.parentStory.paragraphs.item(0); myText.pointSize = 8; myText.justification = Justification.CENTER_ALIGN; newTextFrame.geometricBounds = [y1, x2 , y2, x2+stepX/2]; // Top, Left, Bottom, Right } if (tint > 0) { // tints have to be greater than 0 var rect = pg.rectangles.add({geometricBounds:[y1,x1,y2,x2]}); if (tint < 100) { rect.fillColor = tints[i]; } else { // with 100% it´s not a tint, it´s the actual color rect.fillColor = special; } rect.overprintFill=true; // set overprint flag rect.strokeWeight = 1; rect.strokeColor = paper; } x1 = x2; x2 = x2 + stepX; } y1 = y2; y2 = y2 + stepY; x1 = stepX / 2.0; x2 = x1 + stepX; } }; // end of function main /* * function adds color swatch to document and returns color */ function color_add(myDocument, myColorName, myColorModel, myColorValue){ if(myColorValue.length == 3) myColorSpace = ColorSpace.RGB; else myColorSpace = ColorSpace.CMYK; myColor = myDocument.colors.item(myColorName); myColor = myDocument.colors.add(); myColor.properties = {name:myColorName, model:myColorModel, space:myColorSpace ,colorValue:myColorValue}; return myColor; } |