how do I get to add multiple colors instead of only the one listed in this c# code? I’d like to have 3 differnet colors for 3 different “Rarity” types.
so instead of all Rarity values having the same color, I’d like to have a color set to each Rarity type.
the Rarity types and RGB code colors are:
- Superior. 152, 251, 152
- Elite. 147, 112, 219
- Legendary. 255, 215, 0
everything including colors is set in the code, so I only need this piece of code adjusted.
`else if (displayInfo.Rarity > Rarity.Common)
{
label = new DXLabel
{
ForeColour = Color.FromArgb(0, 204, 0),
Location = new Point(4, ItemLabel.DisplayArea.Bottom),
Parent = ItemLabel,
Text = displayInfo.Rarity.ToString(),
};`
I’m new to the whole coding thing, so I didn’t know what to add instead of Color.FromArgb(0, 204, 0).
Ed Trancefied is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.