printf '\e[s' will save the attributes and position of the cursor, so that the script can reset them using printf '\e[u'. But I only want to save the attributes. In other words, I want to change the color of text, print some text, and then restore the color settings at the end of the script. If I use the [s and [u sequences, I will be resetting the position, which I do not want.
What's the easiest way to restore the color attributes to the cursor without restoring the position?