Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update README with example of how to create a custom theme #73

Open
Suplanus opened this issue Jan 30, 2023 · 2 comments · May be fixed by #74
Open

Update README with example of how to create a custom theme #73

Suplanus opened this issue Jan 30, 2023 · 2 comments · May be fixed by #74
Assignees
Labels
documentation Improvements or additions to documentation
Milestone

Comments

@Suplanus
Copy link

I found no way to declare a custom theme base on colored theme. The class ConsoleHtmlColor is set to internal so I can't use it.
Any idea, or should I send a PR?

@augustoproiete
Copy link
Member

You don't really need ConsoleHtmlColor in order to create a custom theme... Colors are just HTML color code strings. E.g.:

var customTheme = new RichTextBoxConsoleTheme
(
    new Dictionary<RichTextBoxThemeStyle, RichTextBoxConsoleThemeStyle>
    {
        [RichTextBoxThemeStyle.Text] = new RichTextBoxConsoleThemeStyle { Foreground = "#ffffff" },
        [RichTextBoxThemeStyle.SecondaryText] = new RichTextBoxConsoleThemeStyle { Foreground = "#c0c0c0" },
        // etc.
    }
);

That said, if the ConsoleHtmlColor class is useful for creating custom themes, I'd take a PR to make the class public.

@Suplanus
Copy link
Author

Ah, great... thanks 💖
So I think its not needed to make it public. I will make an example for white background and take it in the readme as PR.

@augustoproiete augustoproiete changed the title Custom theme Update README with example of how to create a custom theme Jan 31, 2023
@augustoproiete augustoproiete added the documentation Improvements or additions to documentation label Jan 31, 2023
@augustoproiete augustoproiete added this to the vNext milestone Jan 31, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Improvements or additions to documentation
Development

Successfully merging a pull request may close this issue.

2 participants