/* ************************************************************************** */ /* */ /* ::: :::::::: */ /* ft_hex_to_rgb.c :+: :+: :+: */ /* +:+ +:+ +:+ */ /* By: rbousset +#+ +:+ +#+ */ /* +#+#+#+#+#+ +#+ */ /* Created: 2020/02/14 17:28:58 by rbousset #+# #+# */ /* Updated: 2020/02/14 17:28:58 by rbousset ### ########lyon.fr */ /* */ /* ************************************************************************** */ #include #include t_rgb ft_hex_to_rgb(int32_t color) { t_rgb rgb; rgb.r = ((color >> 16) & 0xff) / 255.0; rgb.g = ((color >> 8) & 0xff) / 255.0; rgb.b = ((color) & 0xff) / 255.0; return (rgb); }