module Buyer::SettingsHelper

    def css_override(options = {})
      unless ['#', '', nil].include?(options[:colour])
	      "#{options[:element]} {#{options[:style]}: #{options[:colour]};}"
	    end
    end


    def colour_value(value, field)
      return value unless value.blank?
        case field
        when "bg_colour"          then '#ffffff'
        when "link_colour"        then '#3875D7'
        when "text_colour"        then '#000000'
        when "menu_bg_colour"     then '#000000'
        when "menu_link_colour"   then '#ffffff'
        when "content_bg_colour"  then '#ffffff'
        end
    end

end
