API Reference > OdCm Classes > OdCmColorBase Class
OdCmColorBase Class
OdCmColorBase
Syntax
C++
class OdCmColorBase;

CmColorBase.h

This class is a virtual interface for classes that represent the unnamed and named colors specified by the byLayer, byBlock, byColor, byACI, byPen, Foreground, byDgnIndex, or None color methods.

 
Name 
Description 
 
blue 
Returns the blue color component of the database color object as a value in the range from 0 to 255. 
 
Returns the book name of the database color object. 
 
Returns the packed 32-bit integer value that stores the color method and color components of the database color object. 
 
Returns the color index (ACI) of the database color object. 
 
Returns the color method of the database color object as a value of the ColorMethod enumeration. 
 
Returns the color name of the database color object. 
 
Returns the display color name of the database color object. 
 
Returns the green color component of the database color object as a value in the range from 0 to 255. 
 
Checks whether the color method is byACI for the database color object and returns true if and only if the color method is set to kByACI, otherwise it returns false. 
 
Checks whether the color method is byBlock for the database color object and returns true if and only if the color method is set to kByBlock or was set to kACIbyBlock, otherwise it returns false. 
 
Checks whether the color method is byColor for the database color object and returns true if and only if the color method is set to kByColor, otherwise it returns false. 
 
Checks whether the color method is byDgnIndex for the database color object and returns true if and only if the color method is set to kByDgnIndex, otherwise it returns false. 
 
Checks whether the color method is byLayer for the database color object and returns true if and only if the color method is set to kByLayer or was set to kACIbyLayer, otherwise it returns false. 
 
Checks whether the color method is Foreground for the database color object and returns true if and only if the color method is set to kForeground or kACIforeground, otherwise it returns false. 
 
red 
Returns the red color component of the database color object as a value in the range from 0 to 255. 
 
Sets the blue color component for the database color object.
 
 
Sets the color method and color components for the database color object as an integer value.
 
 
Sets the color index (ACI) of a color palette and sets the color method to byACI for the database color object.
 
 
Sets the color method for the database color object as a value of the ColorMethod enumeration.
 
 
Sets the green color component for the database color object.
 
 
Converts to the named color and sets the color name and book name for the database color object. If the book name is an empty string, the method sets the book name to UNNAMED. If the color name is an empty string, the method ignores the specified values. If the book name and the color name are empty strings, the method converts the database color object to the unnamed color.
 
 
Sets the red color component for the database color object.
 
 
Sets the red, green, and blue color components and the color method to byColor for the database color object.
 
Copyright © 2002–2020. Open Design Alliance. All rights reserved.