parentId fixed, a few functions added

fix for parentId not changing during collisions
functions for converting colors to different formats
style change