Preheat the oven to 350°F. Line three 9-inch round baking pans with parchment paper.
In a medium bowl, whisk together the flour, baking powder, baking soda, and salt.
In the bowl of an electric mixer fitted, beat the butter and sugar on medium speed until light and fluffy, about 3 to 4 minutes. Add the eggs, one at a time, beating for 1 minute between each addition. Scrape down the bowl as necessary. Beat in the vanilla extract. Reduce the mixer speed to low, add half of the flour mixture, and beat well. Add the cream of coconut in a slow stream and beat well. Add the remaining flour mixture and beat until just combined. Finish stirring with a spatula. Divide the batter among the 3 prepared cake pans.
Bake until golden brown on top and a wooden pick inserted in the center comes out clean, 20 to 25 minutes. Let cool in the pans for 20 minutes before inverting onto wire racks to cool completely before frosting.
In the bowl of a stand mixer fitted with the paddle attachment, beat the cream cheese until smooth. Add the butter and beat until smooth, scraping down the sides as needed. Add food coloring (optional) and mix until you’ve reached your desired color. Sift the confectioners’ sugar into the bowl, then add the vanilla extract and dash of salt and beat until light and fluffy, about 2 minutes. Place one cake upside down on a cake stand, and spread 1/3 frosting over top. Cover with second cake, top side up; frost top and sides of cakes with remaining frosting.