If the king is in check you can't see if the king is selected or not. The color stays red and doesn't change to green. It seems like the being in check is more relevant than the piece being selected.
Please consider to make selecting the piece the most important determinator for the background color of a piece.
Please consider to make selecting the piece the most important determinator for the background color of a piece.