Page 1 of 1

Automatic Darker/Lighter Stroke Color, based of Fill Color

Posted: Sat Nov 26, 2011 6:23 pm
by ruibjr
Hi,

I have been creating a lot of characteres lately.
I have also been rigging them, as well as animating them.
And one thing that really would help me, would be an option for the shape strokes, which would automatically select the stroke color as a darker or brighter version of the fill color.

Something like:

[x] Use smart stroke color [ ] Make it brighter
Offset: [32]

This could be done by something like:

a = fillColor & 0xff000000;
r = (fillColor >> 16) & 0xff;
g = (fillColor >> 8 ) & 0xff;
b = fillColor & 0xff;
if(makeItBrighter) {
newR = r >= offset ? r - offset : 0;
newG = g >= offset ? g - offset : 0;
newB = b >= offeset ? b - offset : 0;
} else {
newR = r <= 0xff - offset ? r + offset : 0xff;
newG = g <= 0xff - offset ? g + offset : 0xff;
newB = b <= 0xff - offeset ? b + offset : 0xff;
}
newFillColor = a + (newR << 16) + (newG << 8 ) + newB;

The [ ] Use smark keystroke could be placed on the Stroke configuration area, while the option to make it darker or brighter, and the offset, could be placed on the Advanced settings area.