[settings]
sections = FUTURE,STDLIB,THIRDPARTY,FIRSTPARTY,LOCALFOLDER
multi_line_output = 3
include_trailing_comma = true
skip_gitignore = true
function lightOrDark(color) { | |
let r, g, b, hsp; | |
color = parseInt( | |
'0x' + color.slice(1, color.length - 2).replace( color.length < 5 && /./g, '$&$&') | |
); | |
r = color >> 16; | |
g = color >> 8 & 255; | |
b = color & 255; | |
hsp = Math.sqrt(0.299 * (r * r) + 0.587 * (g * g) + 0.114 * (b * b)); | |
return hsp > 127.5 ? 'light' : 'dark'; |
#requires -Version 2 -Modules posh-git | |
function Write-Theme { | |
param( | |
[bool] | |
$lastCommandFailed, | |
[string] | |
$with | |
) |