Yes, you could add the rgb() color values to your database, in the country dimension table (or create a lookup table in a different DB and link tables in script). Then set the colors in your table in the e.g. background color attribute expressions (expression tab, open attributes by clicking on the plus sign).
There are multiple ways of doing this. Either you add the colors somewhere as a datasource easily linked to the entity in your datamodel, and read it in all QVW's (as an excel file or a QVD) or you can create an include file that contains variables for each color and include this file in all your QVW's. All depends upon the size of your project, number of colors involved, etc.