It is narrated from a companion that the Prophet (peace be upon him) forbade sitting partly in the sun and partly in the shade, and said that this is a satanic way of sitting.
Hadith Referenceمسند احمد / مسند المكيين / 15421
Hadith Gradingحکم دارالسلام:حديث صحيح، وهذا إسناد حسن