Sign inSign up

dabeastnet/pixelposh

By dabeastnet

•Updated about 1 year ago

PixelPoSH is a PowerShell module that generates customizable, random SVG and PNG backgrounds.

Image
Integration & delivery
Developer tools
0

1.0K

dabeastnet/pixelposh repository overview

⁠PixelPoSH

See github⁠

PixelPoSH is a PowerShell module that generates customizable, random SVG backgrounds using the PSSVG⁠ DSL (no System.Drawing). It includes patterns like bubbles, concentric circles, stripes, squares, two kinds of waves, and two types of lowpoly. You can add overlay text (single or multi-line), choose colours from palettes (local or colormind.io), and optionally rasterize to PNG using external tools. It's perfect for quickly generating backgrounds for desktops, websites, or any project that could use a splash of color and creativity. PixelPoSH also supports colored text!

⁠Parameters

The following are the available parameters, with it's default values:

        [int]$ImageWidth = 800,
        [int]$ImageHeight = 600,
        [string]$Path = ([System.IO.Path]::Combine([System.IO.Path]::GetTempPath(), 'Background.svg')),
        [string]$Text,
        [int]$TextSize = 40,
        [string]$TextColor = '#FFFFFF',
        [switch]$Bubble,
        [switch]$Circle,
        [switch]$Square,
        [switch]$Stripe,
        [switch]$PaletteWave,
        [switch]$GradientWave,
        [switch]$LowPolyGradient,
        [switch]$LowPolyPalette,
        [string]$PngPath, #Patch to save the PNG to
        [switch]$RasterizeToPng, #Switch to rasterize
        [string]$PngBackground = 'none'   # or '#ffffff' if you want opaque PNGs by default

⁠Pull

docker pull dabeastnet/pixelposh:latest
# (Optional) always fetch the newest tag:
docker run --pull=always dabeastnet/pixelposh:latest pwsh -c '$PSVersionTable.PSVersion'

⁠Generate an SVG

mkdir -p out
docker run --rm -v "$PWD/out:/out" dabeastnet/pixelposh:latest \
  pwsh -NoProfile -c "
    Import-Module ./PixelPoSH/PixelPoSH.psm1;
    New-RandomImage -GradientWave -Text 'Hello Docker' -Path /out/bg.svg
  "

⁠Generate a PNG (rasterized from SVG inside the container)

docker run --rm -v "$PWD/out:/out" dabeastnet/pixelposh:latest \
  pwsh -NoProfile -c "
    Import-Module ./PixelPoSH/PixelPoSH.psm1;
    New-RandomImage -PaletteWave -Text 'Hello PNG' -Path /out/bg.svg -RasterizeToPng -PngPath /out/bg.png
  "

Tag summary

Content type

Image

Digest

sha256:b539cab8b…

Size

147.9 MB

Last updated

about 1 year ago

docker pull dabeastnet/pixelposh