Color Class


Color Class

Represents a color in Autodesk Revit.
Inheritance Hierarchy

Namespace: Autodesk.Revit.DB
Assembly: RevitAPI (in RevitAPI.dll) Version: 25.0.0.0 (25.0.0.0)
Syntax
public class Color : APIObject

The Color type exposes the following members.

Constructors
Name Description
Public method Color Constructor that takes the red, green and blue channels of the color.
Top
Properties
Name Description
Public property Blue Get the blue channel of the color. Setting a channel is obsolete in Autodesk Revit 2013. Please create a new color instead.
Public property Green Get the green channel of the color. Setting a channel is obsolete in Autodesk Revit 2013. Please create a new color instead.
Public property Static member InvalidColorValue Get the invalid Color whose IntegerValue is -1.
Public property Code example IsReadOnly Identifies if the object is read-only or modifiable.
(Inherited from APIObject )
Public property IsValid Identifies if the color represents a valid color, or an uninitialized/invalid value.
Public property Red Get the red channel of the color. Setting a channel is obsolete in Autodesk Revit 2013. Please create a new color instead.
Top
Methods
Name Description
Public method Dispose Causes the object to release immediately any resources it may be utilizing.
(Inherited from APIObject )
Public method Equals Determines whether the specified object is equal to the current object.
(Inherited from Object )
Public method GetHashCode Serves as the default hash function.
(Inherited from Object )
Public method GetType Gets the Type of the current instance.
(Inherited from Object )
Public method ToString Returns a string that represents the current object.
(Inherited from Object )
Top
Remarks
Colors obtained from some API methods may represent an uninitialized/invalid color. You can identify these using the IsValid property.
See Also