To forage safely for plants or mushrooms, you should know the identifying characteristics of your target species and any non-edible lookalikes.
There are definitely no general rules for determining mushroom edibility.
A great resource is Mushrooms Demystified by David Arora.
https://en.wikipedia.org/wiki/Galerina_marginata
Such simplistic rules are a bad idea when foraging. Before you eat anything, positively identify it.
The notion that brown gilled mushrooms are safe whereas white gilled mushrooms are not sounds like region-specific folk knowledge, and given the way mushroom species migrate and the existence of relatively rare mushrooms, I wouldn't count on it to be reliable anywhere in the world. Positive identification is the only safe way to select edible mushrooms, and as this article points out even that bears the risk of false identification, particularly if you aren't fully aware of what other similar species to check for.