How can I associate the answers on my input table to color legends?