Application of some food and foodstuffs, which are natural, for anything different from eating is permissible according to the Islamic law. In as much as there is benefit for human being in that action. For indeed, things in principle of Islam is permissible until overruled by a text of prohibition. 

Ibn Baz, may Allah be pleased with him said: There’s no offence in that if there’s benefit in it. Use of henna with egg yolk or others are amongst the permissible things. This is acceptable if there is benefit in it for the hair by making it long, soft or silky, or other ways that would benefit the hair, help its growth and prevent it from falling.

Ibn Uthaymeen also said: It is well known that these things – food items – are among the foods that God Almighty created for the nourishment of the body, so if a person wants to use them for something else that is not impure like medicine, then there is nothing wrong with that. Allah says: (He is the One Who created everything in the earth for you.) The word (La kum) in the verse, which means “to you” includes the general meaning of benefit, if there is no evidence for the prohibition. As for the use for cosmetics, there are other alternative materials that can replace foodstuffs, these items should rather be explored first.
We should also recognize that there is nothing wrong with beautification in Islam. Indeed, Allah, Glory be to Him, is beautiful and loves beauty, but in being extravagant in it until it becomes the biggest concern, such that the muslim only cares about it and neglects many of his religious and worldly interests. This is part of extravagance Allah, the Almighty, doesn’t like extravagance.