http://www.certapro.com/certapro-fad-palette-paint-colors.aspxのようなカラー パレットを作成する必要があります。さまざまな RGB の組み合わせによるカスタム カラー パレット。それを行う最も簡単な方法は何ですか?[カスタム カラーごとにピクチャ ボックスを挿入する必要がありますか?それとも、Visual Studio のカラー ダイアログをこのようにする必要がありますか?)
1356 次
1 に答える
0
ColourDialogue.CustomColours プロパティは、ダイアログによって表示されるカスタム カラーを定義する int の配列です。最も簡単な方法は、ハードコードされた int の配列を定義することです。これらの色の web-hex 値がわかっている場合は、次のように 16 進数表記を使用できます。
System.Windows.Forms.ColorDialog MyDialog = new ColorDialog();
// Allows the user to select or edit a custom color.
MyDialog.AllowFullOpen = true ;
// Assigns an array of custom colors to the CustomColors property
// Note that the most significant byte is the alpha value,
// so most of the time it will remain FF
MyDialog.CustomColors = new int[]{ 0xFF974724, 0xFFe7eae3 };
色の 16 進数値がわからない場合は、Web ページから色を選択できる EyeDropper アドオンをブラウザーに装備することをお勧めします (または、Chrome 以外のブラウザーの場合は同等の機能です)。
于 2013-07-08T02:05:55.323 に答える