Code:
     /* Replace characters after the first \0 with empty spaces */
        for(j=0; j<6; j++){
           for(i=0; i<7; i++){ 
             if(scanned[j][i] == '\0') { 
               for(k = i; k<7; k++){
                    scanned[j][k] = ' ';
               }
             }
           }
        }
Your code and comment do not agree. Setting k = i is a mistake because you're also erasing the ith character, the \0 you should be keeping.

You can prove it by taking your array of arrays and printing out all the colors like this:

Code:
for (i = 0; i < 7; i++) {
    printf("%s\n", scanned[i]);
}
It's undefined, so expect cuts from broken glass.

It doesn't really matter what any left over characters might be, so I would either erase that bit the comment refers to, or fill the whole matrix with '\0' before you do input.