This topic contains 5 replies, has 4 voices, and was last updated by
December 5, 2016 at 3:57 pm #59404ParticipantPoints: 0Rank: Member
Brand new to PowerShell and frustrated. I've searched and can't find answer to what seems like should be a common and obvious question. What is the powershell ise color coding for syntax? What or where is the list? Yes I'm sure it's changeable but in default what do the color alterations of my text tell me for each color? Like Green text is comment, at least I think it is. It seem like the Pink elephant standing in the room. Nobody addresses the obvious. Why is that? All of that good information just blowing right passed me. Also pointers, preferably charts, for fundamental structure of or in Powershell. Visual learner, fewest words possible. Pictures, diagrams, schematics ... help?
December 5, 2016 at 4:45 pm #59407ParticipantPoints: 0Rank: Member
It is easy to see what the default options are with this command
And there is documentation on the options
Sorry but is a wall of text.
December 5, 2016 at 6:49 pm #59412ParticipantPoints: 0Rank: Member
Thank you. That was very helpful. Now how do you decipher the $psISE.Options.ConsoleTokenColors values? I know the pattern of 6 digit hex for RGB color but the values given are 8 hex digit? Except for the 3 primary pure saturated colors, I wouldn't know what color it is. Is there a set of 16 or so values chart? Can you CLI request a translation to human name colors?
December 5, 2016 at 6:56 pm #59415KeymasterPoints: 1,811Rank: Community Hero
It's probably an alpha channel (transparency). And no, there's no preset list of 16 colors, nor does .NET provide a translation function apart from the system Colors enumeration.
December 6, 2016 at 12:38 pm #59479ParticipantPoints: 1Rank: Member
You can try this code:
$CC = [System.Drawing.ColorConverter]::new() [System.Drawing.Color]$CC.ConvertFromString('red')
In above method, you can convert color names into Color objects.
December 5, 2016 at 6:18 pm #59410KeymasterPoints: 1,811Rank: Community Hero
If you get into the Options menu you can modify the theme, and it shows you what each color-able element is, and how it's presently set. Sorry that I don't have a picture or chart for you, but perhaps that's something you can take on! If it'd help someone else, then making the diagrams might also help you refine you understanding of the product.
The topic ‘Color coded syntax?’ is closed to new replies.