Welcome! Log In Create A New Profile

Advanced
Re: Really Big Colour Code: 117313504
avatarFebruary 12, 2013 11:43AM
Thanks everybody, based on the above I'm going with this for the time being:

edgeCol.inc(mainCol.getBrightness()>0.5 ? -0.6 : 0.6);
edgeCol.a=1.0;

I'll be using this only for decoded colors and to compliment missing edge info from COLOUR tags. At some point later on I probably make an option for global calculated edge colors using a HSL transformation like Allen and Martin suggest / use.

edit:

Playing some more made me change the above to:

void calcEdgeFromMain() { edgeCol.a=1.0; edgeCol.setIncRGB(mainCol, mainCol.getBrightness()>0.5 ? -0.5 : 0.5); }

Because I like it a bit more, I've also tried Travis' suggestion (scaling by 40% up or down):

void calcEdgeFromMain() { edgeCol.a=1.0; edgeCol.setScaledRGB(mainCol, mainCol.getBrightness()>0.5 ? 0.6 : 1.4); }

But I found the contrast isn't high enough resulting in disappearing edges under certain angles (caused by shading). The other methods seem less affected by that effect, maybe that's the reason Alan choose 0.4 (although i agree with Travis on it being to red in his example, hence using 0.5).

Using "rgb2hsl -> adjust -> hsl2rgb" will probably be the best solution, but I havn't tried that yet.

note: the called functions limit rgb values to 0.0 .. 1.0)

Edited 1 time(s). Last edit at 2013-02-12 02:50PM by Roland Melkert.
SubjectAuthorViewsPosted
Really Big Colour Code: 117313504 Eric Himbeault769January 11, 2013 08:32AM
Re: Really Big Colour Code: 117313504 Travis Cobbs283January 11, 2013 09:14AM
Re: Really Big Colour Code: 117313504 Travis Cobbs259January 11, 2013 09:17AM
Re: Really Big Colour Code: 117313504 Eric Himbeault274January 11, 2013 01:49PM
Re: Really Big Colour Code: 117313504 Travis Cobbs246January 11, 2013 02:38PM
Re: Really Big Colour Code: 117313504 Allen Smith299January 11, 2013 04:06PM
Re: Really Big Colour Code: 117313504 Travis Cobbs303January 11, 2013 04:49PM
Re: Really Big Colour Code: 117313504 Alex Taylor287January 12, 2013 05:38AM
Re: Really Big Colour Code: 117313504 Michael Heidemann283January 12, 2013 04:05PM
Re: Really Big Colour Code: 117313504 Alex Taylor285January 13, 2013 04:05AM
Re: Really Big Colour Code: 117313504 Michael Heidemann268January 13, 2013 10:35AM
Re: Really Big Colour Code: 117313504 Eric Himbeault256January 14, 2013 08:21AM
Re: Really Big Colour Code: 117313504 Roland Melkert362February 11, 2013 11:13AM
Re: Really Big Colour Code: 117313504 Michael Heidemann293February 11, 2013 02:00PM
Re: Really Big Colour Code: 117313504 Travis Cobbs309February 11, 2013 02:01PM
Re: Really Big Colour Code: 117313504 Allen Smith276February 11, 2013 02:29PM
Re: Really Big Colour Code: 117313504 Travis Cobbs280February 11, 2013 03:27PM
Re: Really Big Colour Code: 117313504 Travis Cobbs289February 11, 2013 03:30PM
Re: Really Big Colour Code: 117313504 Allen Smith286February 11, 2013 04:36PM
Re: Really Big Colour Code: 117313504 Martin James308February 12, 2013 12:51AM
Re: Really Big Colour Code: 117313504 Roland Melkert546February 12, 2013 11:43AM



Sorry, only registered users may post in this forum.

Click here to login