adobe / leonardo

Generate colors based on a desired contrast ratio
http://www.leonardocolor.io
Apache License 2.0
1.94k stars 104 forks source link

Parameter setup bugfixes #205

Closed NateBaldwinDesign closed 1 year ago

NateBaldwinDesign commented 1 year ago

Description

This addresses two issues encountered when loading themes via URL.

  1. Themes with lightness set to 0 do not load: #179
  2. Themes do not load when the first defined color scale uses OKLAB/OKLCH plus smoothing. #179

The first issue was due to lightness interpreted as undefined. The second was solved by ignoring the smoothing setting for the first color scale, then setting it downstream if the color space was OKLAB or OKLCH.

Motivation

Want users to be able to use the site with these parameters setup.

Screenshots

To-do list

NateBaldwinDesign commented 1 year ago

@DmitryBaranovskiy or @GarthDB sorry for the 🏓 ping but I do not have merge & release rights. The first fix is straightforward. The second fix is a bit of a workaround, but still succeeds in loading the example URLs filed in the linked issue.