The error message is very strange - I can’t see how that would happen in a regular Discourse installation. The version hash you quoted is from before the calculate_dominant_color! feature was introduced.
I suspect you either have a partially-applied update, or there is some third-party plugin installed which is modifying the code.
Could you try updating to the latest version? And if that doesn’t work, could you share a list of your plugins here?