int rx = 255*r + 0.5; bclamp(rx,0,255);
int gx = 255*g + 0.5; bclamp(gx,0,255);
int bx = 255*b + 0.5; bclamp(bx,0,255);
char rgb_text[BCSTRLEN];
sprintf(rgb_text, "#%02x%02x%02x", rx, gx, bx);
rgb_hex->update(rgb_text);
int rx = 255*r + 0.5; bclamp(rx,0,255);
int gx = 255*g + 0.5; bclamp(gx,0,255);
int bx = 255*b + 0.5; bclamp(bx,0,255);
char rgb_text[BCSTRLEN];
sprintf(rgb_text, "#%02x%02x%02x", rx, gx, bx);
rgb_hex->update(rgb_text);