Both tiles need the same number of dots.
Read the full rules
Colors you find are saved on this device and carry over between games.