try:
=ARRAYFORMULA(IFNA(VLOOKUP(""&ROW(C1:C), SUBSTITUTE(REGEXREPLACE(TRIM(
SPLIT(FLATTEN(QUERY(QUERY(SPLIT(FLATTEN(ROW(C1:C)&"♠♣"&IFERROR(TRIM(
SPLIT(LOWER($C1:$C), " t ", 0, 0))&"♦")), "♣"),
"select max(Col2)
where Col2 matches '^"&TEXTJOIN("$|^", 1, IF(A1:A="",,LOWER(A1:A)&"♦"))&"$'
group by Col2 pivot Col1"),,9^9)), "♠")), "♦$", ), "♦", ","), 2, 0)))
or shorter (works only with one color):
=INDEX(IFNA(REGEXEXTRACT(C1:C, TEXTJOIN("|", 1, SORT(A1:A, 1, 0)))))