ANSI/ASME have suggestions. I'm pasting a link to a pdf that shows examples, but I can't confirm if recommendations have changed with changes to the versions mentioned in the PDF.
the colour coding that was followed by my current company on the field for oil and gas pipinig / pipelines was totally the opposite of what was being used in the oil company I worked with earlier
Hence i realised that although there may be an international standard or a guideline on such matters it is totally upto the comapny on how they would manage the colour coding of their pipelines / pipework and consequently set up their own standards
As far as I know there are no requirements, only recommendations and guides, like the 'pirates code' is is a really more of a suggestion.
Yes, each company must establish and maintain their own system.