Pansies.format.ps1xml

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
<?xml version="1.0" encoding="utf-8" ?>
<!-- *******************************************************************
This is Joel "Jaykul" Bennett's coloring format file for PowerShell 5.1
******************************************************************** -->
<Configuration>
  <SelectionSets>
    <SelectionSet>
      <Name>Text</Name>
      <Types>
        <TypeName>PoshCode.Pansies.Text</TypeName>
        <TypeName>Microsoft.PowerShell.Console.Text</TypeName>
      </Types>
    </SelectionSet>
    <SelectionSet>
      <Name>Color</Name>
      <Types>
        <TypeName>PoshCode.Pansies.RgbColor</TypeName>
        <TypeName>PoshCode.Pansies.ColorSpaces.ColorSpace</TypeName>
      </Types>
    </SelectionSet>
  </SelectionSets>
  <ViewDefinitions>
    <View>
      <Name>Text</Name>
      <ViewSelectedBy>
        <SelectionSetName>Text</SelectionSetName>
      </ViewSelectedBy>
      <TableControl>
        <TableHeaders>
          <TableColumnHeader>
            <Width>15</Width>
            <Label>BackgroundColor</Label>
          </TableColumnHeader>
          <TableColumnHeader>
            <Width>15</Width>
            <Label>ForegroundColor</Label>
          </TableColumnHeader>
          <TableColumnHeader>
            <Label>Object</Label>
          </TableColumnHeader>
          <TableColumnHeader>
            <Label>ToString</Label>
          </TableColumnHeader>
        </TableHeaders>
        <TableRowEntries>
          <TableRowEntry>
            <TableColumnItems>
              <TableColumnItem>
                <ScriptBlock>
                  $_.BackgroundColor.ToVtEscapeSequence($true) + " $([char]27)[0m " + $_.BackgroundColor.ToString()
                </ScriptBlock>
              </TableColumnItem>
              <TableColumnItem>
                <ScriptBlock>
                  $_.ForegroundColor.ToVtEscapeSequence($true) + " $([char]27)[0m " + $_.ForegroundColor.ToString()
                </ScriptBlock>
              </TableColumnItem>
              <TableColumnItem>
                <ScriptBlock>
                  ("$(if ($_.Object -is [ScriptBlock]) { "{{ {0} }}" } else { "{0}" })" -f ([System.Management.Automation.LanguagePrimitives]::ConvertTo($_.Object, [string]).Trim())) + "$([char]27)[0m"
                </ScriptBlock>
              </TableColumnItem>
              <TableColumnItem>
                <ScriptBlock>
                  $_.ToString() + "$([char]27)[0m"
                </ScriptBlock>
              </TableColumnItem>
            </TableColumnItems>
          </TableRowEntry>
        </TableRowEntries>
      </TableControl>
    </View>
    <View>
      <Name>Color</Name>
      <ViewSelectedBy>
        <SelectionSetName>Color</SelectionSetName>
      </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>20</Width>
            <Alignment>Left</Alignment>
            <Label>X11ColorName</Label>
          </TableColumnHeader>
          <TableColumnHeader>
            <Alignment>Left</Alignment>
            <Label>Ordinals</Label>
            <Width>25</Width>
          </TableColumnHeader>
          <TableColumnHeader>
            <Width>11</Width>
            <Alignment>Left</Alignment>
            <Label>XTerm Index</Label>
          </TableColumnHeader>
          <TableColumnHeader>
            <Width>12</Width>
            <Alignment>Left</Alignment>
            <Label>ConsoleColor</Label>
          </TableColumnHeader>
        </TableHeaders>
        <TableRowEntries>
          <TableRowEntry>
            <TableColumnItems>
              <TableColumnItem>
                <ScriptBlock>
                  ([PoshCode.Pansies.RgbColor]$_).ToVtEscapeSequence($true) + " $([char]27)[0m " +
                  $(if ($_ -is [PoshCode.Pansies.RgbColor]) { $_.Mode } else { $_.GetType().Name })
                </ScriptBlock>
              </TableColumnItem>
              <TableColumnItem>
                <ScriptBlock>"#{0:X6}" -f ([PoshCode.Pansies.RgbColor]$_).RGB</ScriptBlock>
              </TableColumnItem>
              <TableColumnItem>
                <ScriptBlock>([PoshCode.Pansies.RgbColor]$_).X11ColorName</ScriptBlock>
              </TableColumnItem>
              <TableColumnItem>
                <ScriptBlock>([PoshCode.Pansies.ColorSpaces.ColorSpace]$_).ToString()</ScriptBlock>
              </TableColumnItem>
              <TableColumnItem>
                <ScriptBlock>([PoshCode.Pansies.RgbColor]$_).XTerm256Index</ScriptBlock>
              </TableColumnItem>
              <TableColumnItem>
                <ScriptBlock>([PoshCode.Pansies.RgbColor]$_).ConsoleColor</ScriptBlock>
              </TableColumnItem>
            </TableColumnItems>
          </TableRowEntry>
        </TableRowEntries>
      </TableControl>
    </View>
    <View>
      <Name>Color</Name>
      <ViewSelectedBy>
        <SelectionSetName>Color</SelectionSetName>
      </ViewSelectedBy>
      <WideControl>
        <WideEntries>
          <WideEntry>
            <WideItem>
              <ScriptBlock>
                  ([PoshCode.Pansies.RgbColor]$_).ToVtEscapeSequence($true) + " $([char]27)[0m" + ("#{0:X6}" -f ([PoshCode.Pansies.RgbColor]$_).RGB)
              </ScriptBlock>
            </WideItem>
          </WideEntry>
        </WideEntries>
      </WideControl>
    </View>
  </ViewDefinitions>
</Configuration>