The SEDRIS Data Representation Model
APPENDIX A - Classes CMY Colour |
---|
An instance of this DRM class specifies the actual cyan, magenta, and yellow data values for a colour defined within the CMY colour model. These values shall be between 0.0 and 1.0, inclusive.
Note that the CMY colour model is closely related to the RGB colour 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)
A CMY colour for pure black (cmy_data. cyan = 1.0, cmy_data. magenta = 1.0, cmy_data. yellow = 1.0)
A CMY colour for bright red (cmy_data. cyan = 0.0, cmy_data. magenta = 1.0, cmy_data. yellow = 1.0)
This is very easy to do. After opening the transmittal, before retrieving any <Colour Data>, (or even before opening the transmittal), such a data provider would call the SE_SetColourModel() function, like so: " SE_SetColourModel() (SE_CLR_MDL_RGB);" and for the rest of the execution of that program would never get back a <CMY Colour> instance, because each <Colour Data> instance retrieved from there on out would be an <RGB Colour> instance.
Also, if a user has colour data to be converted from one colour model to another (such as from CMY to RGB), standard utility functions are provided in the SEDRIS Level 1 Read API to carry out these data conversions.
CMYK can be simply derived from CMY. If the user does not care to perform the derivation personally, the DRM API provides colour conversion functions that convert between CMY and CMYK.
The derivation is quite simple. Given a CMY colour, e.g. one with data values of (cyan = 0.7, magenta = 0.5, yellow = 0.2), find the minimum value. In this example, yellow is the minimum value. To convert any CMY colour to a CMYK colour, set the black value equal to the minimum CMY value, then subtract the minimum value from each CMY value. In this example, the CMY colour of (cyan = 0.7, magenta = 0.5, yellow = 0.2) is converted to the CMYK values (cyan = 0.5, magenta = 0.3, yellow = 0.0, black = 0.2)
SE_CMY_Data | cmy_data; | (notes) |
---|
The cmy_data field specifies the CMY colour coordinate.
|