"Make it so there is a low % chance to disregard the color checks each time a slave is generated.."
That is what I was thinking of doing with the weighted system. Start every portrait with a weight of say 1, for every matching attribute add 5. A portrait that matches all 4 attributes would have a weight of 21, and thus be 21 times more likely to be chosen than one that matches nothing. Make it so you can adjust those weights, both starting and per attribute, even if it's just modifying the script file in the mod before applying it. You could thus then set a weight to 0 and it would no longer have an effect on selection at all.
"Create a single brand new ambiguous skin and hair color (eg "Unnaturally colored", "Hybrid") That can be added to the scripts that generate slaves. Then put that in the names of the 'unlucky' portraits so that they have a chance to appear.
Something incredibly complex whereby if a portrait name doesn't have a fitting racial hair/skin color, it is temporarily given one that would naturally fit its race."
Those could be combined. Could go through possible skin colors and check if any match the portrait, recording that. If none do then list of matching colors would be empty. When filtering, could consider an empty list of colors to match all possibilities. Tie that in to weighted system, but consider a "no-color-found" situation to be a lower weight, like wrong colors = 0 weight, matching color = 5, no color = 2?
It'd depend upon probably doing a cached read of portraits, as it might start having a performance impact if doing so many comparisons against a large library of portraits every time a new slave is generated. In general though I like splitting up the code into "Generate portrait attributes" and "match portrait" chunks anyways though.