If someone created a work of art (e.g., drawing, painting or sculpture) by mistake on Yom Tov, what can be done with it? Does it have to be destroyed or can it be kept?
If work that it forbidden by torah law, such as writing or painting, was done by mistake on Shabbos or Yom Tov, no one derive pleasure from it on that day. After Shabbos or Yom Tov, all may enjoy it.
If it was done with the knowledge that it was forbidden, then the one who did it and his family may not derive pleasure from it forever. Others may enjoy it after Shabbos or Yom Tov. There may be more of a reason to be lenient by Yom Tov.
(Shulchan Aruch 318/1 and Biur Halacha 527/23)