When several entries in the merged resource database apply to the same resource for the same widget, only one is selected according to the following precedence rules:
The above rules are applied, in the order given, to the full specification part of all viable entries for a particular widget resource.
Returning to the previous example, the following three entries remain:
2 xbutton*background: green4 xbutton.Command.background: blue
6 *quit.background:yellow
Applying the precedence rules results in the following order:
4 xbutton.Command.background: blue2 xbutton*background: green
6 *quit.background:yellow
Hence, the widget's background would appear blue.