Thanks to @teylyn for directing me to solve this puzzle.
I am adding a little variation here by adding two levels of conditional formatting for color management and demonstrating how to make color shading span lines.
In this advanced solution, I added an extra Value column to satisfy the additional requirements of adding row-based fill.
The Helper column works the same as suggested by @teylyn, evaluating each cell value in column A to the cell value above. If this value is true, the auxiliary column uses the value of column C in the previous row to set the column value of the current row of the row. If false, the current column value of row C is 0.
Once these values ββare set, conditional formatting can be done by selecting all the values ββin column C (select C2, press the ctrl-shft-down arrow), and then set the first conditional rule to use green fill if $ C2 evaluates to 1. Add a new rule by setting the fill color to blue if $ C2 evaluates to 0.
To get colors for line coverage, change the Applies To text box to cover the entire range of values ββfrom $ A $ 2: $ C $ 10.
This is a great solution. Now, to add a third color, or maybe a random color ... there is another day for this.
Stack overflow may not allow me to post an image showing the solution (sorry).
There is no image, but here is what the sheet values ββlook like:
Row Value Helper 123 ABC 1 123 DEF 1 123 GHI 1 456 JKL 0 456 MNO 0 789 PQR 1 789 STU 1 789 VWX 1 789 YZA 1
And here is the formula for updating the values ββin column C:
= IF (A2 = A1, C1, IF (C1 = 1.0.1))