Crack open coconut. Remove coconut flesh from the shell. Peel off the brown skin which is totally optional.
Wash and grate coconut flesh using a box grater, blender or a food processor.
Prepare a cake tin, casserole dish or any suitable container by rubbing vegetable oil in them.
In a saucepan, put water, sugar and ginger, place over medium heat.
Cook until sugar melts and the liquid is reduced but before it caramelizes and changes colour.
If the ginger is not aromatic at this stage, continue with the dish and remove ginger when you can smell it well.
Cook until it has reduced, stirring frequently. in coconut and salt to this syrup and reduce the heat to medium-low.
Stir in vanilla and keep stirring until the mixture starts coming off the sides of the pan. Take off the heat.
Scoop about 2/3 of the mixture into the prepared pan, spread loosely.
Add the colour to the remaining 1/3 of the coconut. Mix well and spread on top of the white in the bowl.
Set aside for 25-30 minutes to cool down and harden.
When formed, cut into bars and serve.
Store in an airtight container in the fridge.