mirror of
https://github.com/scratchfoundation/paper.js.git
synced 2025-01-07 13:22:07 -05:00
Go back to old luminescence values since the new ones produces to large values occasionally.
This commit is contained in:
parent
a1d3b1a167
commit
0e3ed65206
1 changed files with 2 additions and 5 deletions
|
@ -78,11 +78,8 @@ var Color = this.Color = Base.extend(new function() {
|
|||
// Using the standard NTSC conversion formula that is used for
|
||||
// calculating the effective luminance of an RGB color:
|
||||
// http://www.mathworks.com/support/solutions/en/data/1-1ASCU/index.html?solution=1-1ASCU
|
||||
return new GrayColor(1 -
|
||||
(color._red * 0.2989
|
||||
+ color._green * 0.5866
|
||||
+ color._blue * 0.1145),
|
||||
color._alpha);
|
||||
return new GrayColor(1 - (color._red * 0.2989 + color._green * 0.587
|
||||
+ color._blue * 0.114), color._alpha);
|
||||
},
|
||||
|
||||
'gray-rgb': function(color) {
|
||||
|
|
Loading…
Reference in a new issue