22#pragma region color conversion
49 uint8_t grayscale, uint8_t* r, uint8_t* g, uint8_t* b
70 uint8_t r, uint8_t g, uint8_t b,
float* h,
float* s,
float* v
92 float h,
float s,
float v, uint8_t* r, uint8_t* g, uint8_t* b
114 uint8_t r, uint8_t g, uint8_t b,
float* h,
float* s,
float* l
136 float h,
float s,
float l, uint8_t* r, uint8_t* g, uint8_t* b
160 uint8_t r, uint8_t g, uint8_t b,
float* c,
float* m,
float* y,
float* k
184 float c,
float m,
float y,
float k, uint8_t* r, uint8_t* g, uint8_t* b
189#pragma region color interpolation
212 uint8_t r1, uint8_t g1, uint8_t b1, uint8_t r2, uint8_t g2, uint8_t b2,
213 float t, uint8_t* r_out, uint8_t* g_out, uint8_t* b_out
237 float h1,
float s1,
float v1,
float h2,
float s2,
float v2,
float t,
238 float* h_out,
float* s_out,
float* v_out
262 float h1,
float s1,
float l1,
float h2,
float s2,
float l2,
float t,
263 float* h_out,
float* s_out,
float* l_out
268#pragma region color palette generation
290 uint8_t r1, uint8_t g1, uint8_t b1, uint8_t r2, uint8_t g2, uint8_t b2,
316 uint8_t r1, uint8_t g1, uint8_t b1, uint8_t a1, uint8_t r2, uint8_t g2,
317 uint8_t b2, uint8_t a2,
size_t steps
339 float h1,
float s1,
float v1,
float h2,
float s2,
float v2,
size_t steps
361 float h1,
float s1,
float l1,
float h2,
float s2,
float l2,
size_t steps
385 float c1,
float m1,
float y1,
float k1,
float c2,
float m2,
float y2,
386 float k2,
size_t steps
436 uint8_t* colors,
size_t num_colors,
size_t steps,
float* color_distribution
486 uint8_t* colors,
size_t num_colors,
size_t steps,
float* color_distribution
531 float* colors,
size_t num_colors,
size_t steps,
float* color_distribution
576 float* colors,
size_t num_colors,
size_t steps,
float* color_distribution
621 float* colors,
size_t num_colors,
size_t steps,
float* color_distribution
float * tiny_multigradient_hsv_sized(float *colors, size_t num_colors, size_t steps, float *color_distribution)
Generates a multi-gradient of HSV colors based on an array of input colors and a specified number of ...
float * tiny_gradient_cmyk(float c1, float m1, float y1, float k1, float c2, float m2, float y2, float k2, size_t steps)
Generates a gradient of CMYK colors between two specified colors over a given number of steps.
int tiny_rgb_to_grayscale(uint8_t r, uint8_t g, uint8_t b)
Converts RGB color values to a grayscale value using the luminosity method.
float * tiny_gradient_hsv(float h1, float s1, float v1, float h2, float s2, float v2, size_t steps)
Generates a gradient of HSV colors between two specified colors over a given number of steps.
int tiny_icc_parse(TinyIccProfile *profile, const uint8_t *data, size_t size)
Reads a matrix and TRC profile.
float * tiny_multigradient_hsv(float *colors, size_t num_colors, size_t steps)
Generates a multi-gradient of HSV colors based on an array of input colors and a specified number of ...
int tiny_interpolate_hsv(float h1, float s1, float v1, float h2, float s2, float v2, float t, float *h_out, float *s_out, float *v_out)
Interpolates between two HSV colors based on a given interpolation factor t.
int tiny_cmyk_to_rgb(float c, float m, float y, float k, uint8_t *r, uint8_t *g, uint8_t *b)
Converts CMYK (Cyan, Magenta, Yellow, Key/Black) color space values to RGB color values.
int tiny_icc_matrix_between(float *out, const TinyIccProfile *from, const TinyIccProfile *to)
The matrix taking one profile's RGB to another's.
float * tiny_multigradient_hsl(float *colors, size_t num_colors, size_t steps)
Generates a multi-gradient of HSL colors based on an array of input colors and a specified number of ...
float * tiny_gradient_hsl(float h1, float s1, float l1, float h2, float s2, float l2, size_t steps)
Generates a gradient of HSL colors between two specified colors over a given number of steps.
int tiny_icc_convert_image(TinyImage *image, const TinyIccProfile *profile)
Converts a whole image from a profile's space to sRGB.
int tiny_icc_srgb(TinyIccProfile *profile)
The sRGB profile, without needing a file for it.
int tiny_interpolate_rgb(uint8_t r1, uint8_t g1, uint8_t b1, uint8_t r2, uint8_t g2, uint8_t b2, float t, uint8_t *r_out, uint8_t *g_out, uint8_t *b_out)
Interpolates between two RGB colors based on a given interpolation factor t.
int tiny_icc_to_srgb(const TinyIccProfile *profile, const uint8_t *in, uint8_t *out)
Converts one color from a profile's space to sRGB.
int tiny_rgb_to_cmyk(uint8_t r, uint8_t g, uint8_t b, float *c, float *m, float *y, float *k)
Converts RGB color values to CMYK (Cyan, Magenta, Yellow, Key/Black) color space.
int * tiny_multigradient_rgb_sized(uint8_t *colors, size_t num_colors, size_t steps, float *color_distribution)
Generates a multi-gradient of RGB colors based on an array of input colors and a specified number of ...
int tiny_interpolate_hsl(float h1, float s1, float l1, float h2, float s2, float l2, float t, float *h_out, float *s_out, float *l_out)
Interpolates between two HSL colors based on a given interpolation factor t.
int * tiny_gradient_rgb(uint8_t r1, uint8_t g1, uint8_t b1, uint8_t r2, uint8_t g2, uint8_t b2, size_t steps)
Generates a gradient of RGB colors between two specified colors over a given number of steps.
float * tiny_multigradient_cmyk(float *colors, size_t num_colors, size_t steps)
Generates a multi-gradient of CMYK colors based on an array of input colors and a specified number of...
float * tiny_multigradient_hsl_sized(float *colors, size_t num_colors, size_t steps, float *color_distribution)
Generates a multi-gradient of HSL colors based on an array of input colors and a specified number of ...
int * tiny_multigradient_rgba(uint8_t *colors, size_t num_colors, size_t steps)
Generates a multi-gradient of RGBA colors based on an array of input colors and a specified number of...
int tiny_grayscale_to_rgb(uint8_t grayscale, uint8_t *r, uint8_t *g, uint8_t *b)
Converts a grayscale value to RGB color values.
int * tiny_gradient_rgba(uint8_t r1, uint8_t g1, uint8_t b1, uint8_t a1, uint8_t r2, uint8_t g2, uint8_t b2, uint8_t a2, size_t steps)
Generates a gradient of RGBA colors between two specified colors over a given number of steps.
float * tiny_multigradient_cmyk_sized(float *colors, size_t num_colors, size_t steps, float *color_distribution)
Generates a multi-gradient of CMYK colors based on an array of input colors and a specified number of...
int tiny_hsv_to_rgb(float h, float s, float v, uint8_t *r, uint8_t *g, uint8_t *b)
Converts HSV (Hue, Saturation, Value) color space values to RGB color values.
int tiny_hsl_to_rgb(float h, float s, float l, uint8_t *r, uint8_t *g, uint8_t *b)
Converts HSL (Hue, Saturation, Lightness) color space values to RGB color values.
int * tiny_multigradient_rgb(uint8_t *colors, size_t num_colors, size_t steps)
Generates a multi-gradient of RGB colors based on an array of input colors and a specified number of ...
int * tiny_multigradient_rgba_sized(uint8_t *colors, size_t num_colors, size_t steps, float *color_distribution)
Generates a multi-gradient of RGBA colors based on an array of input colors and a specified number of...
int tiny_rgb_to_hsv(uint8_t r, uint8_t g, uint8_t b, float *h, float *s, float *v)
Converts RGB color values to HSV (Hue, Saturation, Value) color space.
int tiny_rgb_to_hsl(uint8_t r, uint8_t g, uint8_t b, float *h, float *s, float *l)
Converts RGB color values to HSL (Hue, Saturation, Lightness) color space.
Image processing library utilities.
A parsed matrix and TRC profile.
Definition color.h:638
float white[3]
Definition color.h:647
uint8_t linear
Definition color.h:651
float curve[3][256]
Definition color.h:649
float to_xyz[9]
Columns of the RGB to XYZ matrix, row major.
Definition color.h:645
Represents an image with its width, height, and pixel data.
Definition image.h:90