X-Git-Url: https://git.sesse.net/?p=movit;a=blobdiff_plain;f=util.h;h=4834bbdf4a86f4dc6048183f6f74d8b1259e3f10;hp=da2bf50b1283a1060020c47f33b2e20c50bd65fc;hb=b8b7f286300668679e61a25beb48f353b5a83f43;hpb=cfe0bc4fa1e2a56eeb12c33e596f79c1292292c8 diff --git a/util.h b/util.h index da2bf50..4834bbd 100644 --- a/util.h +++ b/util.h @@ -15,6 +15,10 @@ // Converts a HSV color to RGB. Assumes h in [0, 2pi> or [-pi, pi> void hsv2rgb(float h, float s, float v, float *r, float *g, float *b); +// Converts a HSV color to RGB, but keeps luminance constant +// (ie. color luminance is as if S=0). +void hsv2rgb_normalized(float h, float s, float v, float *r, float *g, float *b); + // Column major (same as OpenGL). typedef double Matrix3x3[9];