In the previous Halacha, we have explained in general the fundamentals of the forbidden work of dyeing on Shabbat which is one of the works which are forbidden to be performed on Shabbat.
The Opinion of the Sefer Yere’im
Rabbeinu Eliezer of Metz writes in his Sefer Yere’im (Chapter 274) writes that if one eats fruits which cause one’s hands to become colored, he should take care not to wipe his hands in a handkerchief or a cloth. Although when one does this he does not intend to beautify the handkerchief by coloring it and on the contrary, he is actually soiling the handkerchief, nevertheless, this is still prohibited as a result of a rabbinic enactment (for our Sages banned performing a forbidden work even if he is causing ruin as a result). Several Rishonim quote the words of Rabbeinu Eliezer of Metz in his Sefer Yere’im as Halacha.
Many Rishonim quote the above opinion of Rabbeinu Eliezer of Metz. Similarly, Maran Ha’Shulchan Aruch writes (Chapter 320, Section 20): “Some say that if one eats strawberries or any other color-secreting fruit, one should take care not to wipe his colored hands on his clothing or a handkerchief because of [the forbidden work of] coloring.”
The Difficulty With the Opinion of the Sefer Yere’im and the Halachic Bottom Line
This opinion seems quite difficult, for even from the words of the Sefer Yere’im himself we see that this does not constitute a Torah prohibition of coloring, for when one wipes his hands on a napkin, he does not intend to color it; on the contrary, his actions are actually ruining the napkin. If so, this only constitutes a rabbinic prohibition. Based on this, we have a great rule that any work that is only prohibited as a result of a rabbinic enactment (or an action which directly results in the performance of a forbidden work which is only a rabbinic prohibition), when one does not intend to perform this work, it is indeed permissible.
Therefore, regarding our situation, one does not intent to color the napkin; rather, one only intends to wipe one’s hands. If so, Maran Ha’Shulchan Aruch should have ruled leniently in this regard.
However, halachically speaking, Maran Rabbeinu Ovadia Yosef zt”l writes that since the Sefer Yere’im rules stringently and it is quite easy to abstain from this matter which may involve a concern of a Shabbat prohibition, one should act stringently in accordance with the view of the Sefer Yere’im and not wipe one’s hands in a napkin if the napkin will be colored as a result. (See Yabia Omer, Volume 4, Chapter 33, Section 1 and Chazon Ovadia- Shabbat, Volume 5, page 16)
Summary: One should take care not to wipe one’s hands on a napkin on Shabbat when one’s hands are soiled with the color secreted by strawberries and pomegranates.