Page 1 of 1

Shape colors and brightness

Posted: Wed May 11, 2005 11:41 am
by buckyboy314
I know many people are interested in color for cfdg, but I'm wondering what the best way to implement it would be. (Topic stolen from the What Not To Request thread) I personally think that HSB is a great idea, but how about also considering color overlay modes, for example an opacity control (which seems very much in the cf spirit).

Opacity and the CF Philosophy

Posted: Thu May 12, 2005 11:41 am
by Guest
The way brightness is now rendered, some shapes visibly overlap others. What seems to make more sense to preserve the arbitrary drawing order of CFDG AND keep brightness valid is to have a "weight" assigned to each shape. For example, if two shapes have the same weight, their overlap would be the average shade. If one shape has twice the weight of another (e.g. w 10 and w 5, respectively), the weighted average is taken (the brightness is 10/15 of the first shape's brightness plus 5/15 of the second shape's brightness). Furthermore, the white background would have a weight of 0, so anything drawn on top of it would be normal brightness. The startshape would have a weight of, say, 1. This could be implemented for saturation and brightness, too (with the same weight value).

Black and white paint

Posted: Thu May 12, 2005 4:04 pm
by buckyboy314
Another idea is to use black and white "paint" instead of color, so an uncolored area remains white and the darkness of any pixel is the ratio of black paint to total paint.
This could even be extended to HSB by making paints for each aspect.