1
0
mirror of https://github.com/Jermolene/TiddlyWiki5 synced 2025-01-05 23:10:28 +00:00

Add contrast checks to TwentyTwenties palette

I think I might be building a programming language for writing palettes...
This commit is contained in:
Jeremy Ruston 2024-11-18 18:15:53 +00:00
parent aa69c3ae91
commit cd5bbcda8d

View File

@ -17,6 +17,10 @@ base-secondary: rgb(236, 212, 58)
# Tertiary base colour, used for monospaced text and other tertiary elements
base-tertiary: rgb(135, 239, 70)
# Contrast tests
?background-foreground-contrast: [function[colour],[background]] [function[colour],[base-background]] +[colour-contrast:DeltaPhi[]compare:number:gt[25]then[ok]else[Foreground/background contrast is too low]]
# Colour definitions
alert-background: [function[colour],[base-secondary]colour-oklch:l[0.9]]
alert-border: [function[colour],[base-secondary]colour-oklch:l[0.5]]
alert-highlight: [function[colour],[base-primary]colour-oklch:l[0.6]]