As hinted at in comments by @Chris Jaynes, Knockout 2.2.0 makes setting class names easy, as detailed in a blog post by Knockout author Steve Sanderson.
As per the post:
We’ve also made some features work more like you might always have
thought they should work. For example, the css binding can now attach
programmatically-generated CSS class names to elements (previously, it
was limited to toggling predefined CSS class names)
The blog post also includes a jsfiddle you can play with to see the binding in action.
http://jsfiddle.net/qRmfH/light/
Note the css binding syntax in his example, css: chosenTicketCss, which is a computed observable that returns a css class name:
Excellent choice! Suits you perfectly.