My idea for a hook was basically to make it possible to provide a callback function to the Major mode. If this callback function is provided, then when a new file is loaded or an existing one saved with modifications, the callback function is called with the full path to the file. The callback function must return something that basically tells the major mode how to color everything. A simple way would just be to return a list of the colors for every single non-whitespace character taken sequentially. A single very fast pass through this list would then be able to color every character.
Is there a reason why that would not be workable? Also, can you point me to where exactly (e.g. via link to the emacs github mirror) the major modes are stored?