diff --git a/Models/ReactionTest.cs b/Models/ReactionTest.cs --- a/Models/ReactionTest.cs +++ b/Models/ReactionTest.cs @@ -212,25 +212,25 @@ namespace DesertPaintCodex.Models { Reaction? reaction = CalculateReaction(); bool extrapolated = false; - + // SPECIAL CASE: // Check to see if we've got a white-shift reaction that's partially clipped, where we can // still extrapolate the reaction, based on the available information. if (!testing3Way && (reaction != null)) { PaintColor baseColor = _recipe.BaseColor; - if ((reaction.Red < baseColor.Red) && - (reaction.Green < baseColor.Green) && - (reaction.Blue < baseColor.Blue)) + if ((reaction.Red < 0) && + (reaction.Green < 0) && + (reaction.Blue < 0)) { // White-shift down clip. extrapolated = ExtrapolateWhiteFromOneChannel(_observedColor.Red, 0, reaction.Red); if (!extrapolated) extrapolated = ExtrapolateWhiteFromOneChannel(_observedColor.Green, 0, reaction.Green); if (!extrapolated) ExtrapolateWhiteFromOneChannel(_observedColor.Blue, 0, reaction.Blue); } - else if ((reaction.Red > baseColor.Red) && - (reaction.Green > baseColor.Green) && - (reaction.Blue > baseColor.Blue)) + else if ((reaction.Red > 0) && + (reaction.Green > 0) && + (reaction.Blue > 0)) { // White-shift up clip. extrapolated = ExtrapolateWhiteFromOneChannel(_observedColor.Red, 255, reaction.Red); @@ -300,7 +300,8 @@ namespace DesertPaintCodex.Models BadReaction = null; Clipped = ClipType.None; State = TestState.Untested; - + ObservedColor = null; // Clear it out + UpdateRecipe(); }