i think , No of ways it can be done is 7(6)^6
first place can be fill by 7 ways
second colour can be fill by 6
And same goes on till seventh place ..
Consider an example of RGB as colours
And you need to apply above question
1) First colour will be filled by 3 ways : R or G or B
Let us say we select R
2) Second Colour will be filled by 2 ways ( G and B ) say G
3) Thrd colour will be filled by 2 ways ( R and B ) say R or even say B
so you can have RGB or RGR --Look no 2 adj layers have same colours .
Hence No of ways it can be coloured is 7!(6!)^6 ways