prefer function name instead of funcref.
improve algorithm for inactive colors. resolves #178.