Skip to content

Colorful generation #1163

Answered by batzen
yannicklal asked this question in Q&A
Aug 25, 2023 · 2 comments · 1 reply
Discussion options

You must be logged in to vote

That's currently not possible during runtime with the default RuntimeThemeGenerator.
You could write your own, to achieve that.

Are you trying to generate one during runtime or during compile time?

If you want it during runtime you can do it as follows:

    private class RuntimeThemeGeneratorWithColorVariant : RuntimeThemeGenerator
    {
        private static bool initialized = false;

        public static void Initialize()
        {
            if (initialized)
            {
                return;
            }

            Current = new RuntimeThemeGeneratorWithColorVariant();
            initialized = true;
        }

        public string? ColorSchemeVariant { get; set; }

        …

Replies: 2 comments 1 reply

Comment options

You must be logged in to vote
0 replies
Answer selected by batzen
Comment options

You must be logged in to vote
1 reply
@batzen
Comment options

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants