Luminance is outputting grayscale
- Dominant language
- JavaScript
- Stars
- 1
- Forks
- 0
- PR merge metrics
- No merged PRs in 30d
Description
Hi Finn,
Maybe I'm misunderstanding the intention of this code.
I was thinking, if you start with for example #0000ff ( luminance 30 ) and then you give #ff0000 ( luminance 54 ), you would be getting either the first color or the second color but with the luminance of the other color ... like red would return #af0000 or something with the luminance of 30.
Anyway ... I don't get anything remotely close to that. I just get a grayscale color with a luminance value that doesn't match up with anything.
Here's an example.
var myNewColor = [0, 163, 239] // Luminance of 63
// Start with [0,0,141] = Luminance of 13
console.log("myNewColor converted: " + fixedLuminance([0, 0, 141], myNewColor));
// returns 41,41,41 = Luminance of 17
console.log("myNewColor: " + myNewColor);
Thanks
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.