/* ************************************************************************** */ /* */ /* ::: :::::::: */ /* ft_hex_to_rgb.c :+: :+: :+: */ /* +:+ +:+ +:+ */ /* By: joelecle +#+ +:+ +#+ */ /* +#+#+#+#+#+ +#+ */ /* Created: 2020/02/14 17:28:58 by joelecle #+# #+# */ /* Updated: 2020/02/14 17:28:58 by joelecle ### ########lyon.fr */ /* */ /* ************************************************************************** */ #include #include t_rgb ft_hex_to_og_rgb(uint32_t color) { t_rgb rgb; rgb.r = (color >> 16) & 255; rgb.g = (color >> 8) & 255; rgb.b = color & 255; return (rgb); } t_bmp_rgb ft_hex_to_rgb(uint32_t color) { t_bmp_rgb rgb; rgb.r = (color >> 16) & 255; rgb.g = (color >> 8) & 255; rgb.b = color & 255; return (rgb); }