DisplayPipeline.Draw2dRectangle inconsistent colors

Hi, i created a conduit that is calling Draw2dRectangle but the colors are inconsistent when i change view modes. Wireframe and shaded looks good but arctic is screwing it up (unintendedly I would say),

See attached screenshot. same method, two different view modes:
image

It’s drawn on my viewport like below

public class MyConduit : DisplayConduit
        {

            System.Drawing.Color[] myColors = new[]
            {
                System.Drawing.Color.FromArgb(0,0,255),
                System.Drawing.Color.FromArgb(53,0,202),
                System.Drawing.Color.FromArgb(107,0,148),
                System.Drawing.Color.FromArgb(160,0,95),
                System.Drawing.Color.FromArgb(214,0,41),
                System.Drawing.Color.FromArgb(255,12,0),
                System.Drawing.Color.FromArgb(255,66,0),
                System.Drawing.Color.FromArgb(255,119,0)

            };

            protected override void DrawForeground(DrawEventArgs e)
            {
                for (int i = 0; i < myColors.Length; i++)
                {
                    e.Display.Draw2dRectangle(new Rectangle(30, 30 + 32*i, 200, 40), Color.Black, 0, myColors[i]);
                }

            }
        }
1 Like

Edit: I realized this happens only in DrawForeground and not DrawOverlay.

But still - why change the colors when there’s a RGB input? I guess it relates to baked meshes and the way their colors get altered in some views depending if vertexshading is on or off?

1 Like

The faded colors might be caused by the linear workflow/display mode gamma used in rendered and arctic mode. I usually set it to 1.0 and fiddle with the shadow settings to preserve accurate analysis mesh colors and HUD legend.

1 Like