entity:set-color
List of: Scheme Extensions
Subjects: Colors, Entity
Contents: Scheme Support

Action: Sets the display color for an entity or list of entities.

Filename: scm/scmext/dent_scm.cxx

Syntax: (entity:set-color entity-list color)

Arg Types: entity-list entity | (entity ... )

color color

Returns: color

Description: The argument entity-list specifies an entity or list of entities to be assigned a color.


The argument color can accept an integer or a color:rgb value. color specifies a new color to assign to specified entities; color values include:


Black = 0 = #[color 0 0 0]

Red = 1 = #[color 1 0 0]

Green = 2 = #[color 0 1 0]

Blue =3 = #[color 0 0 1]

Cyan = 4 = #[color 0 1 1]

Yellow = 5 = #[color 1 1 0]

Magenta = 6 = #[color 1 0 1]

White = 7 = #[color 1 1 1]


This extension returns the entity's previous color.

Example: ; entity:set-color

; Create a solid block.

(define block1


(solid:block (position 0 -5 0)


(position 15 15 15)))

;; block1

; OUTPUT Original


; Set the color for the block to red

(entity:set-color block1 1)

;; ()

; OUTPUT Result



Figure 4-1. entity:set-color
PDF/SCM/04SC.PDF
HTM/DATA/SCM/SCM/04SC/0019.HTM