C# get good color for label
问题 I have a random color for my background in my windows forms application. Now I want to display a label. But when the random color is white and the label also then the label is not visible. How can I get a perfect color there is visible on my background color(My backgroundcolor is a random color from System.Drawing.Color) 回答1: There are various ways to ensure a proper contrast. Option one : I usually stick to keeping the text Black or White, depending on the brightness of back color. To get