I guess you could use some Element.GetParameterValueByName nodes (to read paramaters A and B) combined with some AND and NOT nodes to compile a new parameter (with Element.SetParameterByName) (e.g. strings called “red”, “green”…) to be used in the color scheme (in which you manually assign the correct color to the corresponding string).
EDIT:
I thought that using revit calculated parameters was quicker so I gave it a try but then I remembered that you cannot use those in Dynamo or in the color scheme, so unless you want to retype the calculated parameter by hand in another parameter here is what I thought:
Now you should have a parameter telling you what color that room should be, so you just have to open the view color scheme and assign the corrisponding color to each value.
Sorry for my belated answer but I was busy…
What you are showing on you answer is exactly what I was looking for. I will have a look and let you know if I still have any problems.