From 9b40029e42f994aeff59ecc44a6d3b8fba93071d Mon Sep 17 00:00:00 2001 From: Julian T Date: Fri, 21 Feb 2020 14:42:42 +0100 Subject: Pretty realistic colors --- pgm.h | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'pgm.h') diff --git a/pgm.h b/pgm.h index b8900b8..3e40034 100644 --- a/pgm.h +++ b/pgm.h @@ -3,12 +3,16 @@ #include #include +#include "vector.h" typedef struct { uint8_t r, g, b; } color_t; color_t *color_set(color_t *c, uint8_t r, uint8_t g, uint8_t b); +color_t *color_scale(color_t *dest, color_t *a, float b); +color_t *color_add(color_t *dest, color_t *a, color_t *b); +color_t *color_scale_vector(color_t *dest, color_t *a, vector_t *v); int pgm_write_header(FILE *fp, unsigned int w, unsigned int h); int pgm_write_pixel(FILE *fp, color_t *c); -- cgit v1.2.3