Development of a standard code for colored graphs and its application to kinematic chains