Fix buf division by 0
add color