Googling a bit about xfce4-terminal
you can find this where it mentions that it is based on VTE project. Then, I searched about its color palette and found this.
In the link, the user mentions that although it is based on VTE, it implements the ISO 6429 standard when it says: "Color selection commands are defined in the international standard ISO 6429 ...".
You can read about ISO 6429 here. In particular, the "ISO 6429 (ANSI) COLOR SEQUENCES" section when it defines the color codes and their purpose.
When you modify the color palette in your terminal, you are effectively associating new colors to those codes. You can see that association by running xfce4-terminal --color-table
.