leonardo icon indicating copy to clipboard operation
leonardo copied to clipboard

[WIP] Sequential colors

Open NateBaldwinDesign opened this issue 5 years ago • 0 comments

Description

Closes part of #2 (sequential only)

  • Added palette type option for "contrast-based" or "sequential"
  • Updated method of generating scales in createScale() to properly output sequences of color (previous method was not accurate when clamping and generating specific steps of color)
  • Added generateSequentialColors() function
  • Added tests for generateSequentialColors
  • Added mechanics for "shift scale" to add exponential scale to lightness distribution of colors.
  • URL parameters differ for palette type
  • Function output in web app changes to display proper function for sequential colors

NOTE: This PR is a breaking change. Many of the output hex values for all other functions are now off by a single hex value (although not all). For example, what used to output #b64601 outputs #b64501. Perceptually this change is unnoticed, however this will break tests.

ISSUES TO FIX:

  • Selection state for clamping and lightness correction are not being retained when visiting a generated URL (always display as checked)
  • Shift scale only affects domain of key colors, thereby has no resulting change in a scale with only two key colors.

Motivation

This will make Leonardo a helpful tool in creating sequential colors, which are divided by the number of desired swatches between two start and end colors. This differs from the previous use case for Leonardo since the division of swatches has no attachment to a target contrast ratio.

Screenshots

image

image

To-do list

  • [x] I have read the CONTRIBUTING document.
  • [ ] This pull request is ready to merge.

NateBaldwinDesign avatar Mar 16 '20 21:03 NateBaldwinDesign