Permalink
Switch branches/tags
Nothing to show
Find file
Fetching contributors…
Cannot retrieve contributors at this time
14 lines (11 sloc) 455 Bytes
param( $start_color )
[System.Reflection.Assembly]::LoadWithPartialName("System.windows.forms") | Out-Null
$ColorDialog = New-Object System.Windows.Forms.ColorDialog
$ColorDialog.Color = $start_color;
$ColorDialog.FullOpen = 1;
$ret = $ColorDialog.ShowDialog()
if ($ret -eq "OK")
{
$hex = [Convert]::ToString($ColorDialog.Color.R, 16) + [Convert]::ToString($ColorDialog.Color.G, 16) + [Convert]::ToString($ColorDialog.Color.B, 16)
Write-Host `#$hex
}