added color accessor option, improved segment exit function