Transferred ColourSegment functions to SegmentLogic class.