Using Data-Sourced Color

You can use data-sourced color selection for any properties of the text box, barcode, line, and shape objects on your template that support color.

The following data source types support data-sourced color:

This feature is useful when you want to change the color of an object dynamically.

Consider the following example:

Your company creates gym membership cards that are color-coded based on the membership type. If the member information, including the membership color, is stored in a connected database, you can configure a color stripe on the card to dynamically change to the correct color for each member.

To do this, you add a rectangle object to the template to be the stripe and then configure the border and fill colors of the stripe to use the color that is set by the corresponding "color" database field in the connected database. Then, when you print the document, the color that is printed matches the membership type of the club member.

Use the Data Sourced Color dialog to configure this feature. To open this dialog, open the Color Picker by clicking the Color option of the property that you want, and then click Set via data source on the Standard or Custom tab of the Color Picker.

Although the document can have only one connection to a database that contains color values, you can connect more than one object to that database, so that different objects can be printed in the same color.

If your database does not include a field that contains color values, you can use the Search and Replace transform to map the values of another database field to the colors that you want. For more information, refer to Search and Replace Dialog.

ClosedTo add a data-sourced color to a template object by using a Database Field data source

  1. Create a database that contains the colors that you want to use. The color values can be in text format (such as "Blue"), RGB format (such as "0,0,255") or hexadecimal format (such as "0000FF").

    For PantoneĀ® colors, use either the "friendly" name (such as "Electric Purple") or the technical name (such as "PANTONE 18-3640 TN").

    The text format values are case-sensitive.

  2. On the template, create an object that supports color, such as a text or shape object.

  3. Double-click the object to open the Object Properties dialog. Alternatively, right-click the object, and then click Properties.

  4. Click the Color option for the property whose color you want to set by using a data source. The Color Picker opens.

  5. Click to expand the Color Picker, and then click Set via data source on the Standard or Custom tab.

  6. In the Data Sourced Color dialog, click to select Get color from data source, and then click Data Source in the left navigation pane.

  7. On the Data Source tab, click for the Type field, use the Change Data Source Type wizard to change the data type to Database Field, and then click Next.

  8. In the wizard, click Database Connection Setup, and then use the Database Connection Setup wizard to connect to the database that contains your color values. (If you already configured this connection, this step is not required.)

  9. In Field name list in the Change Data Source Type wizard, select the field that corresponds to the color values in the database, and then click Finish.

  10. Click OK to close the Data Sourced Color dialog. In the Object Properties dialog, notice that the Color option for the property that you configured displays "<data>".

The following table lists supported predefined colors and their hexadecimal values. To view a list of supported Pantone colors, click the PANTONE tab in the Color Picker.

Color name

 

HEX value

 

Color name

 

HEX value

AliceBlue #F0F8FF  LightSalmon   #FFA07A
AntiqueWhite   #FAEBD7   LightSeaGreen   #20B2AA
Aqua   #00FFFF   LightSkyBlue   #87CEFA
Aquamarine   #7FFFD4   LightSlateGray   #778899
Azure   #F0FFFF   LightSteelBlue   #B0C4DE
Beige   #F5F5DC   LightYellow   #FFFFE0
Bisque   #FFE4C4   Lime   #00FF00
Black   #000000   LimeGreen   #32CD32
BlanchedAlmond   #FFEBCD   Linen   #FAF0E6
Blue   #0000FF   Magenta   #FF00FF
BlueViolet   #8A2BE2   Maroon   #800000
Brown   #A52A2A   MediumAquamarine   #66CDAA
BurlyWood   #DEB887   MediumBlue   #0000CD
CadetBlue   #5F9EA0   MediumOrchid   #BA55D3
Chartreuse   #7FFF00   MediumPurple   #9370DB
Chocolate   #D2691E   MediumSeaGreen   #3CB371
Coral   #FF7F50   MediumSlateBlue   #7B68EE
CornflowerBlue   #6495ED   MediumSpringGreen   #00FA9A
Cornsilk   #FFF8DC   MediumTurquoise   #48D1CC
Crimson   #DC143C   MediumVioletRed   #C71585
Cyan   #00FFFF   MidnightBlue   #191970
DarkBlue   #00008B   MintCream   #F5FFFA
DarkCyan   #008B8B   MistyRose   #FFE4E1
DarkGoldenrod   #B8860B   Moccasin   #FFE4B5
DarkGray   #A9A9A9   NavajoWhite   #FFDEAD
DarkGreen   #006400   Navy   #000080
DarkKhaki   #BDB76B   OldLace   #FDF5E6
DarkMagenta   #8B008B   Olive   #808000
DarkOliveGreen   #556B2F   OliveDrab   #6B8E23
DarkOrange   #FF8C00   Orange   #FFA500
DarkOrchid   #9932CC   OrangeRed   #FF4500
DarkRed   #8B0000   Orchid   #DA70D6
DarkSalmon   #E9967A   PaleGoldenrod   #EEE8AA
DarkSeaGreen   #8FBC8F   PaleGreen   #98FB98
DarkSlateBlue   #483D8B   PaleTurquoise   #AFEEEE
DarkSlateGray   #2F4F4F   PaleVioletRed   #DB7093
DarkTurquoise   #00CED1   PapayaWhip   #FFEFD5
DarkViolet   #9400D3   PeachPuff   #FFDAB9
DeepPink   #FF1493   Peru   #CD853F
DeepSkyBlue   #00BFFF   Pink   #FFC0CB
DimGray   #696969   Plum   #DDA0DD
DodgerBlue   #1E90FF   PowderBlue   #B0E0E6
FireBrick   #B22222   Purple   #800080
FloralWhite   #FFFAF0   Red   #FF0000
ForestGreen   #228B22   RosyBrown   #BC8F8F
Fuchsia   #FF00FF   RoyalBlue   #4169E1
Gainsboro   #DCDCDC   SaddleBrown   #8B4513
GhostWhite   #F8F8FF   Salmon   #FA8072
Gold   #FFD700   SandyBrown   #F4A460
Goldenrod   #DAA520   SeaGreen   #2E8B57
Gray   #808080   Seashell   #FFF5EE
Green   #008000   Sienna   #A0522D
GreenYellow   #ADFF2F   Silver   #C0C0C0
Honeydew   #F0FFF0   SkyBlue   #87CEEB
HotPink   #FF69B4   SlateBlue   #6A5ACD
IndianRed   #CD5C5C   SlateGray   #708090
Indigo   #4B0082   Snow   #FFFAFA
Ivory   #FFFFF0   SpringGreen   #00FF7F
Khaki   #F0E68C   SteelBlue   #4682B4
Lavender   #E6E6FA   Tan   #D2B48C
LavenderBlush   #FFF0F5   Teal   #008080
LawnGreen   #7CFC00   Thistle   #D8BFD8
LemonChiffon   #FFFACD   Tomato   #FF6347
LightBlue   #ADD8E6   Turquoise   #40E0D0
LightCoral   #F08080   Violet   #EE82EE
LightCyan   #E0FFFF   Wheat   #F5DEB3
LightGoldenrodYellow   #FAFAD2   White   #FFFFFF
LightGray   #D3D3D3   WhiteSmoke   #F5F5F5
LightGreen   #90EE90   Yellow   #FFFF00
LightPink   #FFB6C1   YellowGreen   #9ACD32