Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[WIP] Sequential colors #66

Closed
wants to merge 7 commits into from
Closed

[WIP] Sequential colors #66

wants to merge 7 commits into from

Conversation

NateBaldwinDesign
Copy link
Collaborator

@NateBaldwinDesign NateBaldwinDesign commented Mar 16, 2020

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

  • This pull request is ready to merge.

@NateBaldwinDesign NateBaldwinDesign changed the base branch from master to main July 24, 2020 16:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant