Share

Color 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.3.0.0 (25.3.0.0)

Syntax

C#

public class Color : APIObject

The Color type exposes the following members.

Constructors

 NameDescription
Public methodColorConstructor that takes the red, green and blue channels of the color.

Properties

 NameDescription
Public propertyBlueGet the blue channel of the color. Setting a channel is obsolete in Autodesk Revit 2013. Please create a new color instead.
Public propertyGreenGet the green channel of the color. Setting a channel is obsolete in Autodesk Revit 2013. Please create a new color instead.
Public propertyStatic memberInvalidColorValue Get the invalid Color whose IntegerValue is -1.
Public propertyCode exampleIsReadOnlyIdentifies if the object is read-only or modifiable.
(Inherited from APIObject)
Public propertyIsValidIdentifies if the color represents a valid color, or an uninitialized/invalid value.
Public propertyRedGet the red channel of the color. Setting a channel is obsolete in Autodesk Revit 2013. Please create a new color instead.

Methods

 NameDescription
Public methodDisposeCauses the object to release immediately any resources it may be utilizing.
(Inherited from APIObject)
Public methodEqualsDetermines whether the specified object is equal to the current object.
(Inherited from Object)
Public methodGetHashCodeServes as the default hash function.
(Inherited from Object)
Public methodGetTypeGets the Type of the current instance.
(Inherited from Object)
Public methodToStringReturns 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.

See Also

Reference

Was this information helpful?