I may have misunderstood your requirement. The conditional formats I provided allowed the user to define the areas of blue and yellow. What it did not attempt was to take a pre-defined area and then change its reference colour.
To achieve that, I redefined the fixed rows 'Y' and 'K' to be determined by looking up a colour with MATCH and returning a dynamic row with INDEX.
'Blue': = INDEX( Definition, MATCH("Blue",Ref,0), )
'Yellow':= INDEX( Definition, MATCH("Yellow",Ref,0), )
The rest of the calculation goes through as before.
The (exclusive) use of names is a foreign concept as far as the bulk of the spreadsheet community is concerned but here I have been able to modify the definition of two ranges and in doing so change 8 cell references. The changes then propagate through without further modification.