Arbortext IsoDraw > Macro Language Reference > Functions and Data Types > Complex Data Types > ColorSpec
  
ColorSpec
The ColorSpec data type is an either...or data type. This means that the data type could assume three different states. Depending on the state of the data type, it owns two or three properties.
The first and only common to all three different states of the ColorSpec data type is the type property. This property contains the string value "cmykValues", "rgbValues" or "colorRef".
If the value type is "cmykValues" the ColorSpec data type owns a second property called cmyk which is a CMYKColor data type.
#defining a colspec with another variable
DEFINE CMYK_blue AS CMYKColor
CMYK_blue.cyan = 0.99
CMYK_blue.magenta = 0.7
CMYK_blue.yellow = 0.13
CMYK_blue.black = 0.08
DEFINE color_blue AS ColorSpec
color_blue.type = "cmykValues"
color_blue.cmyk = CMYK_blue
Add color "NewBlue" color_blue
If the value type is "rgbValues" the ColorSpec data type owns a second property called rgb which is an RGBColor data type.
#defining a colorSpec directly
DEFINE color_red AS ColorSpec
color_red.type = "rgbValues"
color_red.rgb.red = 188
color_red.rgb.green = 0
color_red.rgb.blue = 29
If the value type is "colorRef" the ColorSpec data type owns another two properties. One is a string and called color and one is a float and called tone. The color property contains the name of the color the data type is referencing. Every color defined in Arbortext IsoDraw is allowed. The tone property defines the modification of intensity as a float (0 to 1) of the color defined by the color property.
DEFINE grey25 AS ColorSpec
grey25.type = "colorRef"
grey25.color = "$ISO_BLACK"
grey25.tone = 0.25