Skip to content

Color Class

Definition

namespace Sharplog.Settings

public class Color
Object
Color

Class containing colors for the ConsoleOutput.

Constructors

Name
Color()
Color(ConsoleColor, ConsoleColor)]

Properties

Name Type GET SET
Background ConsoleColor
Foreground ConsoleColor

Constructors

Color()

public Color()
    : this(ConsoleColor.White, ConsoleColor.Black)

Initializes a new instance of the Color class.

Color(ConsoleColor, ConsoleColor)

public Color(
    ConsoleColor foreground = ConsoleColor.White, 
    ConsoleColor background = ConsoleColor.Black)

Initializes a new instance of the Color class.

Parameter

foreground ConsoleColor · ConsoleColor.White
The foreground color.
background ConsoleColor · ConsoleColor.Black
The background color.

Properties

Background

public ConsoleColor Background { get; set; }
Type: ConsoleColor

Gets or sets the background color.

Foreground

public ConsoleColor Foreground { get; set; }
Type: ConsoleColor

Gets or sets the foreground color.