Skip To Content
PowerShell Gallery
Toggle navigation
Packages
Publish
Documentation
Sign in
Search PowerShell packages:
PSSlack
1.0.0
Private/Color-ToNumber.ps1
Function
Color-ToNumber
{
[
cmdletbinding
(
)
]
param
(
[object]
$Color
)
if
(
-not
$IsCoreCLR
)
{
[System.Drawing.Color]
$Color
=
$Color
'#{0:X2}{1:X2}{2:X2}'
-f
$Color
.
R
,
$Color
.
G
,
$Color
.
B
}
}