ApplicationNewColor Method |
Returns a new color object.
Namespace: Autodesk.Revit.CreationAssembly: RevitAPI (in RevitAPI.dll) Version: 27.0.4.0 (27.0.4.0)
SyntaxPublic Function NewColor As Color
public:
Color^ NewColor()
member NewColor : unit -> Color
Return Value
ColorThe new color object.
ExampleColor NewColorInfo(Autodesk.Revit.Creation.Application appCreation)
{
Autodesk.Revit.DB.Color color = appCreation.NewColor();
color.Red = (byte)127;
color.Green = (byte)64;
color.Blue = (byte)32;
StringBuilder info = new StringBuilder();
info.AppendLine("Red:\t" + color.Red.ToString());
info.AppendLine("Green:\t" + color.Green.ToString());
info.AppendLine("Blue:\t" + color.Blue.ToString());
TaskDialog.Show("Revit",info.ToString());
return color;
}
See Also