|
| 1 | +--- |
| 2 | + |
| 3 | +title: Making a Visual Leitmotif for PowerShell with PSSVG |
| 4 | +author: StartAutomating |
| 5 | +sourceURL: https://github.com/StartAutomating/PSSVG/issues/49 |
| 6 | +--- |
| 7 | +Because Start-Automating is a PowerShell shop, we have to make a lot of logos that visually hint at the relation between this project on PowerShell. |
| 8 | + |
| 9 | +Doing this consistently across projects is a big benefit of building your assets with scripts. Essentially, what we can do is create a reusable part of a design and reuse that part in project after project. |
| 10 | + |
| 11 | +I call this sort of technique a "Visual Leitmotif" (a Leitmotif is a recurrent theme throughout a composition). |
| 12 | + |
| 13 | +The SVG standard provides something that can make this a little easier, a Symbol. |
| 14 | + |
| 15 | +Using PSSVG, we can create our Visual Leitmotif with just a few lines of code. |
| 16 | + |
| 17 | +~~~PowerShell |
| 18 | +=<svg> -ViewBox 100,100 -Content @( |
| 19 | + =<svg.symbol> -Id psChevron -Content @( |
| 20 | + =<svg.polygon> -Points (@( |
| 21 | + "40,20" |
| 22 | + "45,20" |
| 23 | + "60,50" |
| 24 | + "35,80" |
| 25 | + "32.5,80" |
| 26 | + "55,50" |
| 27 | + ) -join ' ') |
| 28 | + ) -ViewBox 100, 100 |
| 29 | +
|
| 30 | + =<svg.use> -Href '#psChevron' -Fill '#4488ff' |
| 31 | +) |
| 32 | +~~~ |
| 33 | + |
| 34 | +The above code produces this little nifty graphic: |
| 35 | + |
| 36 | + |
| 37 | + |
| 38 | +That's a nifty little image we can use again and again. |
| 39 | + |
| 40 | +--- |
| 41 | + |
| 42 | +Here's the [ScriptDeck](https://github.com/StartAutomating/ScriptDeck) logo, which makes pretty prominent use of the PowerShell Chevron: |
| 43 | + |
| 44 | + |
| 45 | + |
| 46 | +--- |
| 47 | + |
| 48 | +Here it is again in the [GitPub](https://github.com/StartAutomating/GitPub) logo: |
| 49 | + |
| 50 | +[](https://github.com/StartAutomating/GitPub/blob/main/GitPub.PSSVG.ps1) |
| 51 | + |
| 52 | +--- |
| 53 | + |
| 54 | +And again in the [ugit](https://github.com/StartAutomating/ugit) logo: |
| 55 | +[](https://github.com/StartAutomating/ugit/blob/main/ugit.PSSVG.ps1) |
| 56 | + |
| 57 | +--- |
| 58 | +And, of course, in an updated [PSSVG](https://github.com/StartAutomating/PSSVG) logo: |
| 59 | +[](https://github.com/StartAutomating/PSSVG/blob/main/PSSVG.PSSVG.ps1) |
| 60 | + |
| 61 | +--- |
| 62 | + |
| 63 | + |
| 64 | +As a design technique, visual leitmotifs are a great way to remind people of a central brand without drawing too much attention to it. |
| 65 | + |
| 66 | +With scripting, it's easy to establish that visual leitmotif and reuse it moving forward. |
| 67 | + |
| 68 | +Just get it right once and include or copy and paste between project to project. |
| 69 | + |
| 70 | +Hope this Helps |
0 commit comments