Skip to content

Commit c518d75

Browse files
feat: Adding color ( Fixes PoshWeb#13 )
1 parent 8363a4f commit c518d75

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
@@ -144,15 +144,15 @@ $buildTimes | ConvertTo-Html -Title BuildTimes > ./times.html
144144
"<h2>Time to build 4096 markdown files</h2>"
145145
"<h3>Last built at $([DateTime]::UtcNow.ToString("s")) running @ $cpuSpeed Mhz</h3>"
146146
"<h4><a href='https://github.com/PowerShellWeb/4kbMarkdownFiles/'><button>Github Repo</button></a></h4>"
147-
147+
148148
foreach ($buildTime in $buildTimes) {
149149
$green = [Math]::Floor(
150150
(1 - $buildTime.RelativeSpeed) * 255
151151
)
152152
$red = [Math]::Floor(
153-
(1 - $buildTime.RelativeSpeed) * 255
153+
$buildTime.RelativeSpeed * 255
154154
)
155-
$color = "#{0:x2}{1:x2}00" -f $red, $green
155+
$color = "#{0:2x}{1:2x}00" -f $red, $green
156156

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

0 commit comments

Comments
 (0)