Style a category from category list

You can try looping to match the category name you need.

$categories = get_the_category();
$category_name="foo1"; // set this to the category name you want to show
$output="";
if($categories){
foreach($categories as $category) 
{
        if ( $category_name == $category->cat_name) 
       {
              $output .='<div class="category-custom-class">'.$category->cat_name.'</div>';
       }
       else
       {
             $output .='<div class="category-custom-class1">'.$category->cat_name.'</div>';
       }
}
echo $output;
}