Go for it.Okay, starting from scratch using an LM311 voltage comparator ...
But the disadvantage of an LM311 is that it has an open-collector output so it requires the addition of a small value pull-up resistor to generate a voltage high enough to turn off the top LED.