Skip to content

Make colors a configurable item #1

@dneimke

Description

@dneimke

Currently colors are hard-coded:

    public static class KnownColors
    {
        public const string Red = nameof(Red);
        public const string Blue = nameof(Blue);
        public const string Gray = nameof(Gray);
        public const string Black = nameof(Black);
        public const string Green = nameof(Green);

        public const string Default = Blue;

        public static bool IsKnownColor(string color) => color switch
        {
            nameof(Red) => true,
            nameof(Green) => true,
            nameof(Blue) => true,
            nameof(Gray) => true,
            nameof(Black) => true,
            _ => false
        };
    }

Now that the parser has been made consumable by other packages, the values should be configurable by the hosting application.

Suggest adding a configuration section that allows for a list of colors and a default to be specified

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions