Zend certified PHP/Magento developer

How to add css in the Specify ClassName

I want to add this code in the Specify Class.

    if (isset($setting['text_colour']) && $setting['text_colour'] != '') {
        $class .= 'color:' . $setting['text_colour'];
    }

How to make $class .= 'color:' . $setting['text_colour']; in the < h3>,< span>,< div> or class(“abc123”)

Thank you