Faceless One and The Prismatic Piper are both legendary creatures (and in one case also a background) with the following ability:
If CARDNAME is your commander, choose a color before the game begins. CARDNAME is the chosen color.
It's clear these cards are designed to allow for adding an additional color to a deck's color identity, but how do they work in terms of rules mechanics?
For a reductionist example, let's say I build a mono-blue deck with Faceless One as the commander. This deck is a valid deck if I declare "blue" as the pre-game color for Faceless One. But what exactly in the rules stops me from choosing "green" between building the deck and starting the game? I intuit that I'm not allowed to choose "green" as that would make the deck illegal, but how is choosing "green" pre-game different from using Prismatic Lace to change the commander's color to green after the game starts (which is legal)?