adobe / leonardo

Generate colors based on a desired contrast ratio

Home Page:http://www.leonardocolor.io

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Equidistant lightness distributions for swatches

NateBaldwinDesign opened this issue · comments

Description

Allow the user to input a lowest and highest ratio (with additional possible ratios inbetween), and then choose a number of additional swatches to generate that will "fill in" the gaps.

For example: User inputs lightest color, darkest color, and primary color for a given scale. The ratios for these may be 1.2, 4.5, and 7. The user wants a palette of 9 total colors (including the three entered into Leonardo). The system should allow users to change total swatches (9) while retaining original color inputs ("locking" the three hex values/ratios), and adding equally distributed interpolated ratios between. In this example, the ratios (distributed but retaining original inputs) would be 1.2, 1.3, 1.56, 1.94, 2.47, 3.15, 4.5, 5.52, and 7

Why do you need this feature?

Allows user to retain original design starting-point (I want these three colors) and interpolates values in a non-destructive way. Current methods of recreating this workflow result in only retaining the lowest and highest contrast values and redistributing all values inbetween.

Additional context

Current, destructive way to accomplish this returns these colors:
image

When a mid-tone swatch is retained (eg at 4.5 contrast ratio), this would be the expected output:
image

Considerations

This feature would enable designers to create less equally distributed swatches overall. The example above illustrates the use case and expected result, however the output is not as evenly distributed.