Revit 2025.3 API
View |
Creates an object that can be passed to View.SetBackground method
to set the background of the Gradient type.
Namespace: Autodesk.Revit.DB
Assembly: RevitAPI (in RevitAPI.dll) Version: 25.3.0.0 (25.3.0.0)
Syntax
public static ViewDisplayBackground CreateGradient( Color skyColor, Color horizonColor, Color groundColor )
Public Shared Function CreateGradient ( skyColor As Color, horizonColor As Color, groundColor As Color ) As ViewDisplayBackground
public: static ViewDisplayBackground^ CreateGradient( Color^ skyColor, Color^ horizonColor, Color^ groundColor )
static member CreateGradient : skyColor : Color * horizonColor : Color * groundColor : Color -> ViewDisplayBackground
Parameters
- skyColor Color
- The top of the sky gradient if the sky is visible.
- horizonColor Color
- The bottom or the sky gradient if the sky is visible, or the top of the ground gradient otherwise.
- groundColor Color
- The ground color if the sky is visible (ground shown in uniform color), or the bottom of the ground gradient if the sky is not visible.
Return Value
ViewDisplayBackgroundNew background object to pass to View.SetBackground.

Exception | Condition |
---|---|
ArgumentNullException | A non-optional argument was null |
See Also