The SEDRIS Data Representation Model
APPENDIX A - Classes
CMY Colour

Class Name: CMY Colour

Superclass - <Colour Data>

Subclasses

This DRM class is concrete and has no subclasses.

Definition

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)

Primary Page in DRM Diagram:

Secondary Pages in DRM Diagram:

This class appears on only one page of the DRM class diagram.

Example

  1. A CMY colour for pure black (cmy_data. cyan = 1.0, cmy_data. magenta = 1.0, cmy_data. yellow = 1.0)

  2. A CMY colour for bright red (cmy_data. cyan = 0.0, cmy_data. magenta = 1.0, cmy_data. yellow = 1.0)

FAQs

How can a data consumer who uses RGB rather than CMY get RGB from a CMY transmittal?

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.

How can a user who needs CMYK convert data into or out of CMYK?

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)

Constraints

Composed of (two-way)

Component of (two-way) (inherited)

Inherited Field Elements

This class has no inherited field elements.

Field Elements

SE_CMY_Data cmy_data; (notes)

Notes

Fields Notes


cmy_data

 The cmy_data field specifies the CMY colour coordinate.

Prev: CM 3D Location. Next: CMY Colour Control Link. Up:Index.

Last updated: July 16, 2004 Copyright © 2004 SEDRIS