The below will make child categories have the same color as their parents. This needs to be pasted into the rails console in two parts. The first will put you in a viewer to see all the categories that it found, press q to quit, then paste the next part. I tested it on my copy of @bartv’s import and it performed as expected.
cats=Category.where('parent_category_id > 0')
cats.each do |cat|
parent = Category.find(cat.parent_category_id)
cat.color = parent.color
cat.save!
end