Skip to content

Instantly share code, notes, and snippets.

@Jaykul
Jaykul / Get-ColorMode.ps1
Last active March 19, 2023 13:39
Virtual terminal queries (DECRQSS) return values as INPUT
function Get-ColorMode {
<#
.SYNOPSIS
Tests for FullColor (RGB) mode and X11/XTerm (XColor) modes by writing SGR and verifying it with a DECRQSS
Returns "Uknown" if there's no DECRQSS support, or "FullColor" and/or "XColor" otherwise
#>
[CmdletBinding()]
param()
$ColorMode = @{