Black is switched plus. grey is the indicator signal, the intermittent on-off voltage (which will be directed to either light blue or orange in the indicator switch, the turn signal wire colors for left and right). green is ground.
Some flashers dont need an extra ground, some do. depending on how they work:
some flashers have a bimetallic strip inside, which gets hot under load, bends, and opens the circuit. as it cools down, it bends back, closing the circuit and starts heating up again. these very basic (and oldstyle) flashers mostly even work when connected incorrect, but they hardly ever work, as they are very sensitive to heat, vibration and other environmental influence.
Some have magnetic coils inside, which open and close the circuit. they create their delays with clever circuitry, and coils and capacitors. they often rely on proper grounding. and the correct load current: as soon as one of your bulbs goes out, the load splits in half, and the switching frequency doubles. they have to be connected correctly: X or B is for the switched plus, L (for Load) is for grey. Ground might be E (Earth).
very new electronic flashers dont care about the load or tension, they just take a steady input voltage, apply a lot of science to it, and deliver a choppy output voltage (usually with minimal energy consumption, delivering all the precious current to the bulbs, unlike the other electromechanical flashers). the electromechanical ones consume a considerable amount of the current which was destined to go to your bulbs.
make sure your flasher is rated for 12 volts (not 6, for small or very old bikes), other than that, you cant go wrong.