The Triads that a chord is in does make a difference in how it sounds, but it is a fairly small difference. Listen to a G major chord in three different positions.
A much bigger difference in the chord's sound comes from the Frequency and Interval between the root-position notes of the chord. For example, if the B in one of the chords above was changed to a B flat, you would still have a G triad, but the chord would now sound very different. So chords are named according to the intervals between the notes when the chord is in root position. Listen to four different G chords.