
With the desired color visible in the window, click the Add to Favorites button (with the Document Styles radio button enabled). In the little window that appears, give the new style a descriptive name ("yellow highlighter"), and leave the two boxes unchecked.
You can now apply that style to selected text in any of your TextEdit documents. Read on if you'd like to see how this works, and how to customize it to your liking.
The SVG-Colors.html file includes all colors with a svg/w3c color name. You can select a color and add it to your favorite styles. Each color is defined by svg/w3c name, hex, and RGB value. If the background color you are looking for isn't in the list, you can add it yourself:
- Open SVG-Colors.html in a standard/plain text editor (eg. TextWrangler).
- Add the background color code you want to use in a line of HTML:
mycolor <span style="background-color:#876543;">mycolor #876543</span>
- Save the file.
Tip: You can use the same styles in xPad as in TextEdit: Activate Show Ruler in xPad; if you add a new style within TextEdit, relaunch xPad to see it.
[robg adds: This worked as described for me.]

