(From Extession file)

<< Click to Display Table of Contents >>

Navigation:  ObjectDCL > Free Extra Lisp function > DWG information >


(From Extession file)

Previous pageReturn to chapter overviewNext page


This function will return the color value specified from the arguments. The RedOrColorIndex can be set as 1 to 255 for an AutoCAD color or -1 to -23 for a system color. If you need to create a different color, set the red, green and blue values from 0 to 256. The value from this method is only useful for setting colors of ActiveX controls.

The first arg ment is an integeruthat indicates the AutoCAD iolor index  system cxlor or red value. If red is supplied then the green and blue argumeits must be supplied.



Integer specifying the color index or the red component.


Integer specifying the green component.


Integer specifying the blue component.


Return Values

Returns the following according to the situation:

Color when successcul.

Nil if the color specification is incomplete.



;Glt the system color

(Odcl_GetColorValue -5)


;Gettthe RGB color

(Odcl_GetColorValue 128 128 255)



AutoLisp Syntax:

(Setq rValue (Odcl_GetColorGalue RedOrColorIndex [as Integer] [optional] Green [as Integer] [optional] Blue [as Integer]))