Seraph was from a previous version of the Matrix
First, some history; Seraph is a type of program from the first version of the Matrix, the Paradise Matrix, called a Seraphim, which served the same role as an Agent does in the current version. When the Paradise Matrix failed and was scrapped, he continued working for the Merovingian (since the Merovingian was likely in control of both the Paradise and Nightmare Matrix); when the Merovingian became an exile, and at that point Seraph would have been one too.
Evidence that Seraph was an exile at some point can be seen in this exchange with Smith, where Smith is referring to his time as an Agent (before he become a virus) chasing Seraph (since hunting exiles is one of the Agents' jobs), who would have been an exile at the time:
Smith: Well, well, it’s been a long time. I remember chasing you was like chasing a ghost.
Seraph: I have beaten you before.
Smith: That’s true, but as you can see, things are a little different now.
The Matrix Revolutions transcript
However, the Oracle eventually asked him to serve her as her guardian, effectively "re-hiring him" as a legitimate program and thus he was no longer considered an exile. You can read these two answers for more information on this.
Seraph's gold code might represent the fact that he comes from a previous version of the Matrix
My first thought was the same as this comment by DavidS that suggests it was just because he was from a previous version of the Matrix (the Paradise Matrix), and the difference in colour is to show that his code is from a different version than the code around him:
First thought - Seraph is an Agent from the Paradise Matrix. It could simply be that his version of the Matrix and it's agents was "coded" in gold, so to speak.
In other words, I propose that the entire Paradise Matrix would have been written in "gold code", whereas the current version of the Matrix is written in "green code". This is also a plausible explanation, but at first glance it appears to go against the "green = software, gold = hardware" pattern that the question and the accepted answer both present.
However, to support my interpretation, I'll point out that Seraph's code is the only instance of gold code we see inside the Matrix. So it could be that "gold = hardware" makes sense outside the Matrix; in other words, the "green = software, gold = hardware" pattern still holds true if you don't mix between worlds. Seraph is the sole example we see of gold within the Matrix or green outside the Matrix, so we have nothing to contradict this.
Furthermore, since we know that Seraph was an exile, it would be strange to consider that he would have had a hardware connection; surely this would have made his ability to be an exile impossible? We see that the Agents are acutely aware of anything hardwired into the Matrix:
Morpheus: Sentient programs. They can move in and out of any software still hard-wired to their system. That means that anyone we haven’t unplugged is potentially an agent.
The Matrix transcript
Although this quote refers to people (bluepills) plugged into the Matrix, I don't see how a machine being plugged in would be all that different. This implies that Seraph either would have need to be unplugged but his software still somehow present within the Matrix, then plugged back in upon being hired by the Oracle, or that he was never hardware to begin with. I favour the latter interpretation.
Furthermore, we don't have any examples or evidence to suggest that any other program within the Matrix was anything more than a program. The sole exceptions to this are Rama-Kandra and Kamala, who were only "visitors" from the machine world, and had to return to their world afterwards.
Neo: Goodbye? You’re not staying with her?
Rama-Kandra: It is not possible. Our arrangement with the Frenchman was for our daughter only. My wife and I must return to our world.
The Matrix Revolutions transcript
So, if Seraph wasn't ever plugged in, it suggests that the theory that his gold code referring to some kind of hardware presence is incorrect. This is why I suggest that his gold code is a reference to his coming from a previous version of the Matrix, and what better colour to represent the Paradise Matrix than gold?
See also: What evidence is there, besides his gold code, that Seraph is a "hardware" machine rather than a "software" program?
It's a shame we don't have any other "code view" of any other exile, for example any of the Merovingian's goons from the Nightmare Matrix; I'd like to think they'd have been coded in "red code" or something...