Line and grease a square or rectangle tin measuring at least 12cm by 18cm.
Measure the condensed milk into a medium-sized pot or pan. Add sugar and turn on the heat.
Mix continuously until the sugar starts to dissolve. Pay attention to the bottom of the pan to avoid the sugar and condensed milk from burning.
Add butter and vanilla. Stir until the butter is melted.
Add food coloring. Mix well. Turn off the heat if the condensed milk is too thickened.
Add the grated coconut and stir until it is well combined. Turn on the heat again and retain it on low.
Stir the coconut continuously until it turns dry. The sugar traces on the sides of the pan should be turning white.
While the candy is still hot, transfer it into the prepared tray.
Press the candy down with the back of a buttered spoon or with a parchment paper.
Leave the candy aside to cool completely, for at least one hour. The candy should be firm to touch.
Turn the candy out onto a cutting board and cut into squares or bars with a sharp, butterred knife.
Store the candy in a container.