Practice manipulating chords.
Start with a C major triad. Play up and down the scale with the same shape - playing white notes only.
As you do this, you will notice the types of chords you play: (C) major, (D) minor, minor, major, major, minor, diminished (sharpen the F to make it a Bm), (C octave) major.
On each degree of the scale, practice changing the chords from a major to a minor (flattening or sharpening the 3rd - the middle note in the triad) and vice versa.
Just practice loads of this, playing loads of different chord types on all the different degrees of the scale. Once you've nailed the different chords with just the white notes as the tonics (the bottom note in the triad) then move on and do the same with a chromatic scale.
Keep practicing the different types of chords on every note. Once you've done this you can try swapping the order of notes around within the triad or playing the same 3 notes more than once - these are inversions and in my experience get you so much more used to playing around on many different chords.
An example of playing around with the order: beginning with C triad (C E G). Perhaps play, G C E or C G C E - you get the idea.