mirror of
https://github.com/GraphiteEditor/Graphite.git
synced 2025-08-03 13:02:20 +00:00
Add color weights to Grayscale node and improve luminance handling (#1015)
* Add weighted grayscale node * Rename nodes, fix grayscale weighting, add luma calc options * Fix tests * Add Tint Option * Improve (but not full fix) tint --------- Co-authored-by: Keavon Chambers <keavon@keavon.com>
This commit is contained in:
parent
d456640bb8
commit
a709a772d5
7 changed files with 285 additions and 34 deletions
|
@ -371,11 +371,14 @@ mod test {
|
|||
|
||||
use super::*;
|
||||
|
||||
#[ignore]
|
||||
#[test]
|
||||
fn map_node() {
|
||||
// let array = &mut [Color::from_rgbaf32(1.0, 0.0, 0.0, 1.0).unwrap()];
|
||||
GrayscaleNode.eval(Color::from_rgbf32_unchecked(1., 0., 0.));
|
||||
/*let map = ForEachNode(MutWrapper(GrayscaleNode));
|
||||
|
||||
// LuminanceNode.eval(Color::from_rgbf32_unchecked(1., 0., 0.));
|
||||
|
||||
/*let map = ForEachNode(MutWrapper(LuminanceNode));
|
||||
(&map).eval(array.iter_mut());
|
||||
assert_eq!(array[0], Color::from_rgbaf32(0.33333334, 0.33333334, 0.33333334, 1.0).unwrap());*/
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue