Go to the documentation of this file.
6 static char *
rcsid=
"@(#)$Id: RGBHLS.c,v 1.1.1.1 2003/11/20 07:46:30 eus Exp $";
11 #pragma init (init_object_module)
27 if ((*
l = (m +
v) / 2) <= 0) {*h= *
s=0;
return;}
28 if ((*
s = vm =
v-m) > 0)
30 f=(float)(*
s)/(float)(
v+m);
33 f=(float)(*
s)/(float)(511-
v-m);
35 else {*h = 0;
return;}
42 *h = (
g==m ? 5*255+b2 : 255-g2);
44 *h= (b==m ? 255+r2 : 3*255-b2);
45 else *h = (r==m ? 3*255 + g2 : 5*255 - r2);
60 rgb_to_hls(ckintval(argv[0]), ckintval(argv[1]), ckintval(argv[2]),
64 v= (h << 16) | (
l << 8) |
s;
defun("ADR_TO_STRING", mod, ADR_TO_STRING)
void add_module_initializer(char *, pointer(*)())
void hls_to_rgb(int h, int l, int s, int *r, int *g, int *b)
pointer RGB_TO_HLS(context *ctx, int n, argv)
void rgb_to_hls(int r, int g, int b, int *h, int *l, int *s)
static void init_object_module()
euslisp
Author(s): Toshihiro Matsui
autogenerated on Thu Jun 15 2023 02:06:43