help change a default color into a color picker
Color color = Color.red;
if (playerController?.FGOFLOEPNHI ?? true)
{
color = Color.white;
} else if (playerController?.GIFCMNNJNHD ?? true) {
color = Color.green;
}
3 Replies
i want to change the "white" "green" "red" into a hex color picker
so that you can enter the hex value and it change there
This is pretty vague. What type is
Color
here? There's a lot of different definitions for Color in dotnetif you're using System.Drawing.Color you can use https://learn.microsoft.com/en-us/dotnet/api/system.drawing.color.fromargb?view=net-8.0#system-drawing-color-fromargb(system-int32-system-int32-system-int32-system-int32)
Color.FromArgb Method (System.Drawing)
Creates a Color structure from the four 8-bit ARGB components (alpha, red, green, and blue) values.