Chinese worldwide claim a culture of 5000 years. However, there is little historical proof, that is written documentation, to back this up. In fact, there aren't any artifacts either that go that far back. There are only references to this period in other works.
One of the legends is of the Huang Di, the so-called ancestor of the Han people. A student asked me what he is called in English and I said Yellow Emperor. 'Why yellow?' they asked. Well I think it's just a title or the royal color. Or could it be a family name?
I think the bigger questions is did he really exist as a real person?
Well true or not, the legend casts some light on how the deities developed in Chinese religion. The Huang Di was said to have developed Chinese Medicine thus prolonging his own life to 100 and achieving immortality thereafter. In all likelihood this was accomplished by several people but over time and through word of mouth it became a legend.
When Chinese people 'pray', it is more like giving respect to the people in history that accomplished great things or that gave something to build society. This can be seen in another popular legend about the development (discovery) of tea, which although not attributed to this Yellow Emperor, it was attributed to another.