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

Chroma not able to parse a value that passed through it #273

Open
whizzbbig opened this issue Jun 25, 2021 · 5 comments
Open

Chroma not able to parse a value that passed through it #273

whizzbbig opened this issue Jun 25, 2021 · 5 comments

Comments

@whizzbbig
Copy link

function colorizeSliders(color, hue, brightness, saturation) {
// Scale Brightness
const midBright = color.set("hsl.l", 0.5); // isn't responding
Screenshot 2564-06-26 at 2 49 09 AM

Screen.Recording.2564-06-25.at.9.46.58.PM.mov

const scaleBright = chroma.scale("black", midBright, "white");

// Scale Saturation
const noSat = color.set("hsl.s", 0);
const fullSat = color.set("hsl.s", 1);
const scaleSat = chroma.scale([noSat, color, fullSat]);

// Update Input Colors
saturation.style.backgroundImage = linear-gradient(to right, ${scaleSat( 0 )}, ${scaleSat(1)});
brightness.style.backgroundImage = linear-gradient(to right, ${scaleBright( 0 )}, ${scaleBright(1)});
hue.style.backgroundImage = linear-gradient(to right, rgb(204, 75, 75), rgb(204, 204, 74), rgb(75, 204, 75), rgb(75, 204, 204). rgb(75, 75, 204), rgb(204, 75, 204), rgb(204, 75, 75)});
}

@whizzbbig
Copy link
Author

the main issue is whenever i try to update input for hue and brightness it shows errror that i dont get

@korompaiistvan
Copy link

I think you might be missing a set of square brackets around the inputs on line 52.

@whizzbbig
Copy link
Author

I think you might be missing a set of square brackets around the inputs on line 52.

uh actually i was following the course of dev ed and i am pretty sure that i haven't missed anything

@korompaiistvan
Copy link

korompaiistvan commented Jul 26, 2021 via email

@whizzbbig
Copy link
Author

sir help me to correct it then..

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

No branches or pull requests

2 participants