API Reference > OdDg Classes > OdDgColorTable Class
OdDgColorTable Class
OdDgColorTableOdDgColorTable
Syntax
C++
class OdDgColorTable : public OdDgElement;

DgColorTable.h

  1. The ordinary color table of DGN files. Each database (file) could have its color table of 256 colors (otherwise, the default color table is available). This table keeps all color for the indices [0...255].

 

  1. Also, the extended color table could be stored among xAttributes of the file (see the static methods below). This table could keep an unlimited number of colors linked by indices of { indices > 255 }.

 

  1. Please, note that a set of values is predefined (kColorByCell, kByLevel, etc). See OdDgGraphicsElement.h for details.

 

Corresponding C++ library: TG_Db 

 

 
Name 
Description 
 
Add extended color to extended color table. Return dgn color index of new color.
 
 
If background is white MicroStation draws elements black instead of white. To do the same if background color is defined for this palette as white (element with index #254) then all elements in palette with white will be tuned to black. 
 
 
 
 
 
 
 
it tries to find the given RGB color within existing color tables (or add a new color to the extended color table) 
 
Get extended color from extended color table by dgn color index. Return true if color with requested dgn color index is present into table.
 
 
Return count of extended colors into extended color table.
 
 
Return dgn color index of extended color by index into extended color table.
 
 
 
 
This is the overview for the isCorrectIndex method overload. 
 
Load color table from color resource *.tbl file. 
 
This is the overview for the lookupRGB method overload. 
 
use the color tables of the given database to search for the color (either ordinary or extended ones); returns zero if fails (+the method to check indices) 
 
 
 
Save color table to color resource *.tbl file. 
 
Set extended color to extended color table by dgn color index. Return true if color with requested dgn color index is presented into table and modification of color successfully finished.
 
 
 
Copyright © 2002–2021. Open Design Alliance. All rights reserved.