Visio Guy

Visio Discussions => ShapeSheet & Smart Shapes => Topic started by: AnotherNoOne on March 08, 2019, 02:11:15 PM

Title: Use a different accent of the same color based on another shapes Fill
Post by: AnotherNoOne on March 08, 2019, 02:11:15 PM
ok, so iam kind of in an awkward spot. I want to force one shape to have the same accent color like the other, but one step lighter. and this for every possiblity. Ive thought about using the FillForegrnd Cell of the Shape with the color, to get the Color, and then add or subtract something, but I have no idea how. Ive attached the Shape. If someone has an idea that would be great.
Title: Re: Use a different accent of the same color based on another shapes Fill
Post by: wapperdude on March 08, 2019, 03:04:12 PM
See this post:  http://visguy.com/vgforum/index.php?topic=129.0 (http://visguy.com/vgforum/index.php?topic=129.0)
Title: Re: Use a different accent of the same color based on another shapes Fill
Post by: AnotherNoOne on March 08, 2019, 03:18:51 PM
Thank you!

For anyone finding this while having the same Problem:

Use TINT(color,deltaLum) (color is the color you want to modify, deltaLum is the amount by which you want to increase/decrease luminosity.)
Title: Re: Use a different accent of the same color based on another shapes Fill
Post by: Yacine on March 08, 2019, 04:39:22 PM
There are actually many other color functions. Check for instance tone, shade, blend.
Title: Re: Use a different accent of the same color based on another shapes Fill
Post by: AnotherNoOne on March 18, 2019, 03:10:11 PM
thanks Yacine, that opened up way more options than I thought. Shapes work and look actually very good. The 3D-feel is definetly there.
Title: Re: Use a different accent of the same color based on another shapes Fill
Post by: Yacine on March 18, 2019, 07:52:28 PM
Check also Wapperdude's essay on colors. I think your question inspired him to write it.
http://visguy.com/vgforum/index.php?topic=8729.0
Title: Re: Use a different accent of the same color based on another shapes Fill
Post by: vojo on March 19, 2019, 12:33:37 PM
Before the days of tint et al, you could also do this in RGB

user.redcolor = MIN(MAX(RED(<other shape color>), 240), 20)
user.greencolor = MIN(MAX(GREEN(<other shape color>), 240) 20)
user. bluecolor = MIN(MAX(BLUE(<other shape color>), 240),20)

<this shape color> = RGB(user.redcolor + 10, user.greencolor - 10, user.bluecolore + 10)

MIN, MAX compands the color to give you head room to change color

BTW, you can do the same sort of thing with font color

something like
font color = if(<average of RGB> < <something like 125>, 1,0)

This will make font white on dark colors....black on light colors...may want to experiment as appropriate

And lastly, font size

font size = 4pt * <current width>/<original width>

Shape grows ==> font grows    shape shrinks ==> font shrinks