Skip to content

Add saturation adjustment for generated color palette #491

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

Merged
merged 3 commits into from
Aug 1, 2019

Conversation

Inbal-Tish
Copy link
Collaborator

No description provided.

});
}

function adjustSaturation(colors, color) {
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Let's add some test to cover these logic

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ok

@Inbal-Tish Inbal-Tish requested a review from ethanshar July 31, 2019 14:01
if (lightness > lightnessLevel) {
const saturation = Math.round(hsl.color[1]);
if (saturation > saturationLevel) {
array = [];
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

sorry, should have wrote it before
let's shorten this a little..
you can
array = _.map(colors, e => e !== color ? addSaturation(e, saturationLevel) : e)

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Cool

@ethanshar ethanshar merged commit 94a3313 into master Aug 1, 2019
@Inbal-Tish Inbal-Tish deleted the feat/Colors_palette_saturation branch August 5, 2019 11:34
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.

2 participants