typed logic
cond color function