set node color based on attributes