This little web application automatically finds scales which match a given chord - in other words, it searches through a large catalogue of known scales and displays all the scales which contain all the notes in the given chord.
Once it's found all the matching scales, it automatically calculates the fewest notes within each scale which uniquely identify that scale amongst all the others, and shows those notes in red. That means that if your improvisation emphasises those notes, it should bring out the character of that particular scale.