* calculate brightness from color; scale color * fix merge * fix sending color only for brightness independent rgb color * fix tests for rgb and rgbw color * use public match_max_scale