Skip to content

Color

Public Class

Represents a color in Autodesk Revit.

Inheritance Hierarchy

System.Object
Autodesk.Revit.DB.APIObject
Autodesk.Revit.DB.Color

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.


Properties

Name

Description


Public Property

Get the blue channel of the color. Setting a channel is obsolete in Autodesk Revit 2013. Please create a new color instead.


Public Property

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

Get the invalid Color whose IntegerValue is -1.


Public Property
Code Example

Identifies if the object is read-only or modifiable.
(Inherited from APIObject)


Public Property

Identifies if the color represents a valid color, or an uninitialized/invalid value.


Public Property

Get the red channel of the color. Setting a channel is obsolete in Autodesk Revit 2013. Please create a new color instead.


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)


Remarks

Colors obtained from some API methods may represent an uninitialized/invalid color. You can identify these using the IsValid property.