Adding check color function to replace duplicate code.
Adding check color function to replace duplicate code.

smharper/openmc,walshjon/openmc,liangjg/openmc,liangjg/openmc,shikhar413/openmc,mit-crpg/openmc,smharper/openmc,mit-crpg/openmc,shikhar413/openmc,walshjon/openmc,liangjg/openmc,paulromano/openmc,walshjon/openmc,paulromano/openmc,amandalund/openmc,amandalund/openmc,mit-crpg/openmc,shikhar413/openmc,walshjon/openmc,paulromano/openmc,amandalund/openmc,mit-crpg/openmc,amandalund/openmc,smharper/openmc,shikhar413/openmc,liangjg/openmc,paulromano/openmc,smharper/openmc