Add exotic palette
authorLukas Jiriste <ljiriste@student.42prague.com>
Fri, 26 Apr 2024 07:23:56 +0000 (09:23 +0200)
committerLukas Jiriste <ljiriste@student.42prague.com>
Fri, 26 Apr 2024 07:23:56 +0000 (09:23 +0200)
src/color.c

index 00810009d6f45301ba5f2f5e4f5e53a069a87ee8..7445fd0596ba86275823de2eb33b735428633917 100644 (file)
@@ -6,7 +6,7 @@
 /*   By: ljiriste <marvin@42.fr>                    +#+  +:+       +#+        */
 /*                                                +#+#+#+#+#+   +#+           */
 /*   Created: 2023/11/11 18:50:32 by ljiriste          #+#    #+#             */
-/*   Updated: 2024/01/17 12:19:22 by ljiriste         ###   ########.fr       */
+/*   Updated: 2024/04/26 09:23:27 by ljiriste         ###   ########.fr       */
 /*                                                                            */
 /* ************************************************************************** */
 
@@ -74,3 +74,13 @@ t_color      tri_color(double np)
        colors[3] = to_color(0x00FF0000);
        return (general_palette(np, colors, 4));
 }
+
+t_color        double_exotic(double np)
+{
+       t_color res;
+
+       res.r = *((char *)&np + 2);
+       res.g = *((char *)&np + 5);
+       res.b = *((char *)&np + 7);
+       return (res);
+}