1) photo shows laminate flooring - easy - just cut then paint with acrylic and wipe it off of the uncut surface - disadvantage is laminate flooring is abrasive and hard on router bits
2) pre-finish the wood - then cut - then paint and wipe as above
3) pre-finish and mask with contact paper - then cut - then paint - then peel
4) mask - shallow v-carve outline only - peel and paint inside - peel remaining outside mask