Skip to content

Commit

Permalink
Tweak color formatting
Browse files Browse the repository at this point in the history
  • Loading branch information
Jaykul committed Oct 31, 2024
1 parent be98f08 commit 67d3bda
Showing 1 changed file with 9 additions and 7 deletions.
16 changes: 9 additions & 7 deletions Source/Pansies.format.ps1xml
Original file line number Diff line number Diff line change
Expand Up @@ -77,15 +77,15 @@ This is Joel "Jaykul" Bennett's coloring format file for PowerShell 5.1
</ViewSelectedBy>
<TableControl>
<TableHeaders>
<TableColumnHeader>
<Width>14</Width> <!-- LightGoldenrodYellow? -->
<Label>Mode</Label>
</TableColumnHeader>
<TableColumnHeader>
<Width>9</Width>
<Alignment>Left</Alignment>
<Label>RGB (hex)</Label>
</TableColumnHeader>
<TableColumnHeader>
<Width>12</Width> <!-- ConsoleColor | X11 | XTerm256 -->
<Label>Mode</Label>
</TableColumnHeader>
<TableColumnHeader>
<Width>20</Width>
<Alignment>Left</Alignment>
Expand Down Expand Up @@ -113,11 +113,13 @@ This is Joel "Jaykul" Bennett's coloring format file for PowerShell 5.1
<TableColumnItem>
<ScriptBlock>
([PoshCode.Pansies.RgbColor]$_).ToVtEscapeSequence($true) + " $([char]27)[0m " +
$(if ($_ -is [PoshCode.Pansies.RgbColor]) { $_.Mode } else { $_.GetType().Name })
("#{0:X6}" -f ([PoshCode.Pansies.RgbColor]$_).RGB)
</ScriptBlock>
</TableColumnItem>
<TableColumnItem>
<ScriptBlock>"#{0:X6}" -f ([PoshCode.Pansies.RgbColor]$_).RGB</ScriptBlock>
<ScriptBlock>
if ($_ -is [PoshCode.Pansies.RgbColor]) { $_.Mode } else { $_.GetType().Name }
</ScriptBlock>
</TableColumnItem>
<TableColumnItem>
<ScriptBlock>([PoshCode.Pansies.RgbColor]$_).X11ColorName</ScriptBlock>
Expand Down Expand Up @@ -154,4 +156,4 @@ This is Joel "Jaykul" Bennett's coloring format file for PowerShell 5.1
</WideControl>
</View>
</ViewDefinitions>
</Configuration>
</Configuration>

0 comments on commit 67d3bda

Please sign in to comment.