using System;
using System.Drawing;
using System.Collections;
using System.ComponentModel;
using System.Windows.Forms;
using System.Data;
publicclass MainClass{
publicstaticvoid Main() {
System.Windows.Forms.ColorDialog colorDlg = new System.Windows.Forms.ColorDialog();
Color currColor;
colorDlg.AnyColor = true;
colorDlg.ShowHelp = true;
currColor = Color.BlueViolet;
if (colorDlg.ShowDialog() != DialogResult.Cancel) {
currColor = colorDlg.Color;
// Show current color.
string strARGB = colorDlg.Color.ToString();
MessageBox.Show(strARGB, "Color is:");
}
}
}