File: Truecolor%20code%20420.txt

package info (click to toggle)
ezdxf 0.18.1-1
  • links: PTS, VCS
  • area: main
  • in suites: bookworm
  • size: 46,952 kB
  • sloc: python: 158,141; javascript: 166; cpp: 138; makefile: 116; lisp: 20
file content (11 lines) | stat: -rw-r--r-- 787 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
How to access the truecolor property via AutoLISP?
--------------------------------------------------

By Gopinath Taget
http://adndevblog.typepad.com/autocad/2013/01/how-to-access-the-truecolor-property-via-autolisp.html

True color property of an entity is stored under the DXF code of 420.  It is a 32-bit integer value. When used with True
Color, the 32-bit integer represents a 24-bit color value. The high-order byte (8 bits) is 0, the low-order byte an
unsigned char holds the Blue value (0-255), then comes the Green value, and the next-to-high order byte is the Red Value.
Converting this integer value to hexadecimal yields the following bit mask: 0x00RRGGBB. For example, a true color with
Red = 200, Green = 100 and Blue = 50 is 0x00C86432, and in DXF, in decimal, 13132850.