Abstract Class Name: Color Data

Superclass - SEDRIS Abstract Base

Subclasses

Definition

A 3-tuple containing the color value. If the Color is an RGB Color, then the 3 data values will be values for Red, Green, and Blue; for an HSV color, values for Hue, Saturation, and Value; and for a CMY color, values for Cyan, Magenta, and Yellow.

If the color model is RGB, then Color Data contains the actual Red, Green, and Blue data values for a color defined within the Red Green Blue Color Model. These values are expected to be values between 0.0 and 1.0, inclusive. RGB colors are commonly used by color monitors. The RGB Color Model is probably the best known color model, and is often visualized as a cube, where the Red, Green, and Blue values define coordinates within the cube.

If the color Model is HSV, then Color Data contains the actual Hue, Saturation, and Value data values for a color defined within the Hue Saturation Value color model. The Saturation and Value values are expected to be between 0 and 1. If Value has a value of 0, then the values of Hue and Saturation are meaningless, because the color will be black. If Saturation has a value of 0, then the value of Hue is meaningless, and the value of Value will determine the shade of a grey color, somewhere between white and black. Hue is expected to have a value between 0.0 and 360.0 (not including 360.0). If the value of Hue is 'undefined' (because the value of Value or Saturation is 0), then the value of Hue can be represented as SE_POSITIVE_INFINITY, but this is not required. Basically, if Value == 0.0, then the values of Hue and Saturation should be ignored, and if Saturation == 0.0, then the value of Hue should be ignored. The Hue Saturation Value color model represents the color space as a hexagonal cone. The Hue of the color determines the 'color' of the color. The Saturation of the color determines the 'intensity' of the color, differentiating a 'strong' red from a 'weak' red, for example. And the Value of the color is the difference between a light color and a dark color. Decreasing the Value of a color adds black to the color.

If the color Model is CMY, then Color Data contains the actual cyan, magenta, and yellow data values for a color defined within the Cyan Magenta Yellow color model. These values are expected to be values between 0.0 and 1.0, inclusive. CMY (and CMYK) colors are commonly used by hardcopy devices, such as printers. The CMY color model is closely related to the RGB color model. Cyan is the complement of Red (Cyan = 1.0 - Red); Magenta, of Green (Magenta = 1.0 - Green); and Yellow, of Blue (Yellow = 1.0 - Blue)

Primary Page in DRM Diagram:

Example

  1. An RGB color for pure black. (Red = 0.0, Green = 0.0, Blue = 0.0)
  2. An RGB color for bright red. (Red = 1.0, Green = 0.0, Blue = 0.0)
  3. An HSV color for pure black (Value = 0.0, Hue and Saturation values don't matter)
  4. An HSV color for a bright red (Hue = 0.0, Saturation = 1.0, Value = 1.0)
  5. A CMY color for pure black (Cyan=1.0, Magenta=1.0, Yellow = 1.0)
  6. A CMY color for bright red (Cyan=0. Magenta=1.0, Yellow = 1.0)

FAQs

I don't use the color model that the producer used. How can I get the color values back in the model I use?
If you use any of the SEDRIS defined color models (RGB, CMY, or HSV), then you are in luck. If you tell it to, before you retrieve any color objects, the SEDRIS Level 0 Read API will change all of the color objects into RGB, CMY, or HSV Color objects. And if you need CMYK, ask for CMY, then use the utility functions provided in the SEDRIS conversions API to convert from CMY to CMYK. To tell the SEDRIS Level 0 Read API color you want, after opening the transmittal, before you retrieve any Color Data objects, (or even before you open the transmittal), call the SE_SetColorModel() function, passing in the color model you want to use.

Also, if you ever have color data you want to convert from one color model to another (such as from CMY to RGB), standard utility functions are provided in the conversions API to carry out these data conversions.

Constraints

None.

Component of (one-way)


Prev: Color. Next: Color Entry. Up:Index.