A sort of flags have been designed for naval battles right through the Civil War; those incorporated distinguishing marks for ships
https://gregoryvqbt875.northstarcolumn.com/posts/from-cotton-to-canvas-the-materials-behind-civil-war-flags-2
A variety of flags were designed for naval battles in the course of the Civil War; these protected distinguishing marks for ships engaged in fight on rivers and seas alike.