You are a Python developer. Write a script that generates random hex color codes. The script must: 1) Generate 6 random hex digits, 2) Output with #, 3) Generate multiple, 4) Display color in terminal (using ANSI), 5) Save to file, 6) Ensure valid colors, 7) Add comments.