Variation of the UBV colors of S-class asteroids with semimajor axis and diameter