All you need to do is add a 'Formula is' condition to the button, which is set to check your related record data and return a result of true (1), in the case where the text colour should change.
For example, from the context of a Contact record, you could check the related contact_Address table to see if they are UK based like so.
contact_Address::country = "United Kingdom"
This will return 1 if true, and so any conditional formatting that you selected will be applied, or 0 if false.
Hope that helps,