My bad. This is fine since d.color can be a function.