diff --git a/crates/engine-paint/src/cmd/fill_cmds/duotone_multichannel_modes_tests.rs b/crates/engine-paint/src/cmd/fill_cmds/duotone_multichannel_modes_tests.rs index 88954cf47c..f9cdbda70b 100644 --- a/crates/engine-paint/src/cmd/fill_cmds/duotone_multichannel_modes_tests.rs +++ b/crates/engine-paint/src/cmd/fill_cmds/duotone_multichannel_modes_tests.rs @@ -61,3 +61,15 @@ fn sixteen_bit_duotone_and_multichannel_keep_every_mode() { assert!(greyed_modes(mode, SampleType::U16).is_empty(), "{mode:?}"); } } + +/// Measured too: a Duotone with two inks greys and refuses the same modes as a Monotone one. +#[test] +fn a_duotone_with_two_inks_greys_the_same_list() { + let mut s = crate::session(); + s.execute("file.new", json!({"width": 16, "height": 12, "mode": "grayscale", "depth": 8, "background": "white"})).unwrap(); + s.execute("image.mode.duotone", json!({"type": "duotone"})).unwrap(); + assert_eq!(s.active().unwrap().doc.mode, ColorMode::Duotone); + s.execute("select.all", json!({})).unwrap(); + assert!(s.execute("edit.fill", json!({"contents": "color", "color": "#336699", "mode": "hue"})).is_err(), "Hue"); + s.execute("edit.fill", json!({"contents": "color", "color": "#336699", "mode": "multiply"})).unwrap(); +}