LayerPrintColor

Returns or changes the print color of a layer. Layer print colors are represented as RGB colors. An RGB color specifies the relative intensity of red, green, and blue to cause a specific color to be printed.

Syntax

rhinoscriptsyntax.LayerPrintColor(layer, color=None)

rhinoscript.layer.LayerPrintColor(layer, color=None)

Parameters

layer

Required. String. The name of an existing layer.

color

Optional. Number. The new print color value.  If omitted, the current layer print color is returned.

Returns

Number

If a layer print color is not specified,  the current layer print color if successful.

Number

If a layer print color is specified, the previous layer print color if successful.

Example

import rhinoscriptsyntax as rs

layers = rs.LayerNames()

if layers:

    for layer in layers:

        black = rs.coercecolor((0,0,0))

        if rs.LayerPrintColor(layer)!=black:

            rs.LayerPrintColor(layer, black)

Also See

LayerLinetype

LayerPrintWidth