Did you add that code in the fields config area or did you add it to the fields html (select 2 for Link + Typography)
Ordinarily, in Typography column, you would select html for the appropriate field and add your stuff ie <div class="$cck->getValue('color')"><p>etc... But I don't think you can 'html' a div field. Other fields are fair game.
Maybe, in 'html' on the first field (and is not a Div field) you can add '<div class="$ccck->getValue('color')"><p>etc... and then close it off with an 'END' div field at the end?
Brilliant answer, thanks. The html typo works exactly as described (ie not with a div, but with all else I've tested).
One proviso though, for anyone else using this method, you must have the field you are using as part of the Item view - in this case I don't what to display the hex color value, so I've put it in the hidden part of the template. Unless there's a better way to achieve this?
Since you obviously know a lot about this, can you clarify for me - is the html typo the only place I can use $cck? I've tried using it in the template config (class field), the field config, the field markup, all to no avail...
I'm just trying to keep it simple, and avoid using position overrides, as in this case, all I wanted to do was change one color.