#ifndef COSMOPOLITAN #include #include #include #include #include #endif #ifndef H_COLOURS #define H_COLOURS enum colour_space { CS_INVALID = 0, CS_RGB = 1, // default to RGB CS_HSV = 2, CS_HSL = 3, }; struct colour { double h; double s; double v; double l; int r; int g; int b; enum colour_space sp; }; struct colour get_random_color(unsigned int seed); // doesn't support hsl-hsv or converse, conversion struct colour get_hsl(struct colour c); struct colour get_hsv(struct colour c); struct colour get_rgb(struct colour c); struct colour *get_adjacent(struct colour base, int deg, int num); void print_colour(struct colour c); #endif