How many ways are there to color the vertices of a cube using the colors red, blue, or green such that no edge connects two vertices of the same color? Note that rotations and reflections are considered distinct colorings.

Let's think step by step and output the final answer within \boxed{}.
user