make apply-colors-runtime matching patter more generic