Saturday, December 4, 2010

C# Tutorial: ColorPicker [PAWN Color HEX Code for SAMP Scripts]

Here is the code

private void pictureBox1_DoubleClick(object sender, EventArgs e)
{
    if (colorDialog1.ShowDialog() == System.Windows.Forms.DialogResult.OK)
    {
        pictureBox1.BackColor = colorDialog1.Color;
        string color;
        color = string.Format("0x{0:X8}", pictureBox1.BackColor.ToArgb());
        color = color.Remove(color.IndexOf("x") + 1, 2);
        textBox1.Text = color + "FF";
    }
}

Download ColorPicker [SA:MP]

1 comment:

  1. It works but sometimes it gives me only a default color 0xF0F0F0FF no mater how many times I change it!

    ReplyDelete