Compile the specified pattern into a rule, using the supplied palette to resolve any symbolic colors to actual colors.