Open whizzbbig opened 3 years ago
the main issue is whenever i try to update input for hue and brightness it shows errror that i dont get
I think you might be missing a set of square brackets around the inputs on line 52.
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
i don't know who dev ed is.
compare how you're calling the function on line 52 vs 57. on 52 you're passing the bare arguments, on 57 you pass them as an array. both can't be right (and the documentation shows the array option is expected)
On Sun, 25 Jul 2021, 23:10 whizzbbig, @.***> wrote:
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
— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/gka/chroma.js/issues/273#issuecomment-886258128, or unsubscribe https://github.com/notifications/unsubscribe-auth/AISWZSYMIGGVUVS4LPW4O3LTZR4VLANCNFSM47KWF23A .
sir help me to correct it then..
function colorizeSliders(color, hue, brightness, saturation) { // Scale Brightness const midBright = color.set("hsl.l", 0.5); // isn't responding
https://user-images.githubusercontent.com/54703305/123492661-c3b69400-d637-11eb-9979-7d7d1156a604.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)})
; }