using System;
namespace Spectre.Console
{
///
/// Contains extension methods for .
///
public static class FigletTextExtensions
{
///
/// Sets the color of the FIGlet text.
///
/// The text.
/// The color.
/// The same instance so that multiple calls can be chained.
public static FigletText Color(this FigletText text, Color? color)
{
if (text is null)
{
throw new ArgumentNullException(nameof(text));
}
text.Color = color ?? Console.Color.Default;
return text;
}
}
}