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

Dark mode muted colors #49

Open
ashblue opened this issue Nov 9, 2024 · 0 comments
Open

Dark mode muted colors #49

ashblue opened this issue Nov 9, 2024 · 0 comments
Labels
bug Something isn't working

Comments

@ashblue
Copy link
Owner

ashblue commented Nov 9, 2024

Dark mode colors are muted because the nodes are inheriting from the GUI box skin. Instead the code should look something like this where it doesn't inherit the pre-existing colors.

public GUIStyle Style { get; }

public NodeBoxStyle (Color32 border, Color background) {
    var texture = CreateTexture(19, 19, border);
    texture.SetPixels(1, 1, 17, 17,
        Enumerable.Repeat(background, 17 * 17).ToArray());
    texture.Apply();

    Style = new GUIStyle {
        border = new RectOffset(1, 1, 1, 1),
        normal = {
            background = texture,
            textColor = Color.white,
        },
        alignment = TextAnchor.MiddleCenter,
        fontSize = 12,
        padding = new RectOffset(5, 5, 5, 5),
    };
}

image

image

@ashblue ashblue added the bug Something isn't working label Nov 9, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant