In the first example the swatches used are Custom Color and Color Override
Custom Color is given a CMS-ID of 'mycolor' which is input via a Total CMS Text stack. This is allocated to a customer colour of 'my-header'.
Color Override is then used to assign 'my-header' to a class of 'title' which is assigned to any header that you want to be that colour.
In the second example a custom color of 'my-border' is created in the same way (using a different CMS ID) and then in the background swatch the colour is determined by a swatch allocated to the custom color 'my-border'.