How many possible color combinations? I have a unusual shape like this.

I want to color its squares with 3 colors which no two adjacent(in vertical or horizontal) squares take the same color.
How should I solve such problems? Please give me a clear solution for given shape.
Thanks in advance :)
 A: If you omit the 4 squares that are connected to only one other square, you are left with a rectangular 3x4 grid.
The number of 3-colourings of rectangular grids (divided by 3) is given in integer sequence A078099:
So, for the 3x4 grid, the answer is: $ 3 T(3,4) = 3 * 374 = 1122$
Now for the 4 extra squares, it's easy to see that for any of them, there are exactly 2 possibilities. So, the final answer for the specific grid is:
$ 2^4  1122 = 17952 $
A: overlay the pattern with a chess board to see how you can do it with two colours. Then in order to use three colours repaint one of the squares.
A: Hagen von Eitzen's answer seems valid and correct to me, but I will try to put my spin on it.
Look at the diagonals on a chess board. Notice that they are white, then black, then white, then black, ....
If you want to instead use 3 colors, you can do it like this.
Color the diagonals in this way:
Diagonal 1: Color 1
Diagonal 2: Color 2
Diagonal 3: Color 1
Diagonal 4: Color 3
Repeat this pattern for all of the diagonals. Tada!

