Changing the color an enemy flashes upon death?

I'm making a game in an entirely grayscale art style, and for the most part it's worked out great. I can easily use custom graphics for sprites and UI and everything and found a script to change the color text displays when you heal someone so it fits the game's artstyle.

However, whenever an enemy dies, it flashes a bright red color as it fades out, which clashes very visibly with the intended look of the game. I've been scouring the script for hours, but can't find the spot it draws this color from for me to change it to white. How do I change this?
Stick this anywhere above the Main script
Code:
module RPG
  class Sprite < ::Sprite
    alias call_base_collapse collapse
    def collapse
      call_base_collapse
      self.color.set(255, 255, 255, 255) #<== adjust the RGBA values to your liking
    end
  end
end
It worked, thank you so much!
Hey, so it's been working well for the most part, but for whatever reason every once in a while I'll get this weird message that crashes the game:
1645361716220.png

It doesn't seem to be super consistent which battles cause this message - I'd get the error one boss fight, then do that same fight again and it'd go just fine. Do you have any idea how I could fix this?
With the way I aliased my method, you'll no longer be able to use F12 to restart the game as this will reload your scripts, creating the alias twice, and thus create an endless cycle that leads to an overloaded stack.

Some people actually ensure this won't happen by calling method_defined? prior to the alias.
Code:
unless method_defined?(:call_base_collapse)
  alias call_base_collapse collapse
  def collapse
   ...
  end
end

But since XP scripters of old won't update their decade old scripts, you're better off just adding a fix all solution like
Or copy the original collapse method and modify it so it would directly set the color you need it to display while executing it. There is no good reason to alias it and probably duplicate the set color method call. (Normally the default color would be red, right?)

You can find the original method in the RPG::Sprite class found in the help section, on the Index tab.

(I'm using my phone to surf the net so I can't provide any further details.)
Code:
Code:
unless method_defined?(:call_base_collapse)
  alias call_base_collapse collapse
  def collapse
   ...
  end
end
Where in the script do I paste this? I tried putting it directly above the script and it just gave me a syntax error that crashed the game on startup.

Edit: Nevermind, the fix-all script you gave me seems to be working just fine. Thank you!

Original thread: https://forums.rpgmakerweb.com/threads/changing-the-color-an-enemy-flashes-upon-death.144993/