If you need a legend longer than your data, you’ve gone too far.
In Google Sheets, as in other spreadsheet programs, you can set the formatting of a cell (text color, background color) based on the data contained within that cell. This is called "conditional ...