fluid-dialogue icon indicating copy to clipboard operation
fluid-dialogue copied to clipboard

Dark mode muted colors

Open ashblue opened this issue 1 year ago • 0 comments

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 avatar Nov 09 '24 04:11 ashblue