RVTDocs.com

Application.NewColor

Method
Description:
Returns a new color object.
Syntax
public Color NewColor()
Examples
Color NewColorInfo(Autodesk.Revit.Creation.Application appCreation)
{
    // Create a new color
    Autodesk.Revit.DB.Color color = appCreation.NewColor();

    // Set its RGB values
    color.Red = (byte)127;
    color.Green = (byte)64;
    color.Blue = (byte)32;

    // Display the color info
    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;
}