What’s the right way to implement functions in footer.php

I like to keep my templates short and sweet, for this reason, bulky (or long pieces of) code like the code in your question, I tend move that into a function and then just call the function in my templates or use do_action() calls.

I also split my functionalities between different functions files so that I don’t end up with a functions.php which is 2000 lines long. This also helps to know and remember where a particular function’s code is. For example, all functions relating to pagination goes into one file, all code regarding footer functions goes into a separate file etc.

In your code example, I will also add the function get_current_template(); codes into your new function. The whole function get_current_template(); can simply be rewritten into one line of code in your new template, like

$template_name = str_replace( '.php', '', get_post_meta( get_queried_object_id(), '_wp_page_template', true ) );

I also like to rather return values from a function than echoing them. The reason for this is, sometimes you just need to return values in order to use them later, and if your function echos the values, you cannot do this.

I would rewritten your code to a function in the following matter

function get_styles_for_pages()
{
    /*
     * Immediately stop function and return null if this is not a page
     */
    if ( !is_page() )
        return null;

    /*
     * Use get_queried_object_id() to get current page id to get template name. Very reliable. 
     */ 
    $template_name = str_replace( '.php', '', get_post_meta( get_queried_object_id(), '_wp_page_template', true ) );

    switch ($template_name) {
        case "about-us":
            $templates_color="white";
            break;
        case "homepage":
            $templates_color="white";
            break;
        case "clients_case-studies":
            $templates_color="blue";
            break;        
        case "":
            $templates_color="blue";
            break;
        case "Inner-page":
            $templates_color="blue";
            break;
        case "Inner-page-nb-blue":
            $templates_color="blue";
            break;
        case "Inner-page-nb-orange":
            $templates_color="orange";
            break;
        case "Inner-page-orange":
            $templates_color="orange";
            break;
        default:
           $templates_color="white";
    }

    if (   ($templates_color == 'blue') 
        || ( $templates_color == 'yellow' ) 
        || ( $templates_color == 'orange' ) 
    ){

        $the_logo = 'white-logo.png'; //goes for the logos url
        $white_text="style="color:white!important;""; // goes for the footers text
        $the_hr="whiteb-hr"; //goes for the hrs

    } else {

        $the_logo = 'yellow-logo.png';
        $white_text=""; // goes for the footers text
        $the_hr=""; //goes for the hrs

    }

    /*
     * Built an array to return our values
     */
    $array = array(
        'the_logo' => $the_logo,
        'white_text' => $white_text,
        'the_hr' => $the_hr
    );

    return $array;
}

You can then call it as follow

$array = get_styles_for_pages();
    echo $array['the_logo'];
    echo $array['white_text'];
    echo $array['the_hr'];