Skip to content

Commit 214096a

Browse files
feat: Adding color ( Fixes PoshWeb#13 )
Forcing to bytes
1 parent c518d75 commit 214096a

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

build.ps1

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -146,13 +146,13 @@ $buildTimes | ConvertTo-Html -Title BuildTimes > ./times.html
146146
"<h4><a href='https://github.com/PowerShellWeb/4kbMarkdownFiles/'><button>Github Repo</button></a></h4>"
147147

148148
foreach ($buildTime in $buildTimes) {
149-
$green = [Math]::Floor(
149+
$green = [byte][Math]::Floor(
150150
(1 - $buildTime.RelativeSpeed) * 255
151151
)
152-
$red = [Math]::Floor(
152+
$red = [byte][Math]::Floor(
153153
$buildTime.RelativeSpeed * 255
154154
)
155-
$color = "#{0:2x}{1:2x}00" -f $red, $green
155+
$color = "#{0:x2}{1:x2}00" -f $red, $green
156156

157157
"<details open>"
158158
"<summary class='techniqueSummary'>$($buildTime.Technique) ($([Math]::Round(

0 commit comments

Comments
 (0)