Merge branch 'hykilpikonna:master' into master

This commit is contained in:
Tilman Holube 2024-07-22 13:13:31 +02:00 committed by GitHub
commit 279311fea0
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
5 changed files with 50 additions and 8 deletions

View file

@ -210,12 +210,15 @@ def create_config() -> Config:
return def_lightness
try:
lightness = int(lightness[:-1]) / 100 if lightness.endswith('%') else float(lightness)
if lightness.endswith('%') or int(lightness) > 1:
lightness = int(lightness[:-1]) / 100 if lightness.endswith('%') else int(lightness) / 100
else:
lightness = float(lightness)
assert 0 <= lightness <= 1
return lightness
except Exception:
printc('&cUnable to parse lightness value, please input it as a decimal or percentage (e.g. 0.5 or 50%)')
printc('&cUnable to parse lightness value, please enter a lightness value such as 45%, .45, or 45')
lightness = select_lightness()
_prs = _prs.set_light_dl(lightness, light_dark)

View file

@ -189,6 +189,17 @@ PRESETS: dict[str, ColorProfile] = {
'#282828'
]),
# xenogender sourced from https://commons.wikimedia.org/wiki/File:Xenogender_pride_flag.svg
'xenogender': ColorProfile([
'#FF6692',
'#FF9A98',
'#FFB883',
'#FBFFA8',
'#85BCFF',
'#9D85FF',
'#A510FF'
]),
'agender': ColorProfile([
'#000000',
'#BABABA',