import math


def get_upscaled_rgb_tuple(downscaled_rgb_tuple):
    """Scales RGB color values from decimal 0.0-1.0 to int 0-255.

    Based on source by Greg Taylor in the python-colormath library
    https://github.com/gtaylor/python-colormath/blob/1d168613718d2d7d31ec4230524e987ef66823c7/colormath/color_objects.py#L565
    and used under the BSD license."""
    rgb_r_down, rgb_g_down, rgb_b_down = downscaled_rgb_tuple
    rgb_r = int(math.floor(0.5 + rgb_r_down * 255))
    rgb_g = int(math.floor(0.5 + rgb_g_down * 255))
    rgb_b = int(math.floor(0.5 + rgb_b_down * 255))
    return rgb_r, rgb_g, rgb_b