Welcome! Log In Create A New Profile

Advanced
Re: Really Big Colour Code: 117313504
February 12, 2013 12:51AM
Some time ago I developed my own algorithm to generate edge colors, and applied it to all the colors in LDConfig. I like the results, but that's just a personal preference.

Rather than basing a calculation on the RGB values, I convert them to HSL (Hue, Saturation, Luminance) and transform that instead. (Conveniently, Windows provides two functions ColorRGBToHLS and ColorHLSToRGB, even if they did swap two of the parameters around!) This allows me to keep the hue unchanged, which I think was one of the observations made earlier in this thread.

To calculate the edge color:
  • Use the luminance value to categorize the color as "dark", "dark-ish", "light-ish" or "light" (respectively <85, <112, <159, >=160).
  • Adjust the luminance according to which band it falls in:
    "dark" + 90
    "dark-ish" + 45
    "light-ish" -45
    "light" - 90
  • Halve the stauration
I have this built into a (not very pretty!) Excel spreadsheet where I can just paste the contents of LDConfig into the front sheet, and it spits out the recalculated file at the back. If anybody wants to have a play with it -- and even improve it! -- I'll try and tidy it up a bit and post a copy on here.

--
Martin James
SubjectAuthorViewsPosted
Really Big Colour Code: 117313504 Eric Himbeault799January 11, 2013 08:32AM
Re: Really Big Colour Code: 117313504 Travis Cobbs294January 11, 2013 09:14AM
Re: Really Big Colour Code: 117313504 Travis Cobbs271January 11, 2013 09:17AM
Re: Really Big Colour Code: 117313504 Eric Himbeault288January 11, 2013 01:49PM
Re: Really Big Colour Code: 117313504 Travis Cobbs258January 11, 2013 02:38PM
Re: Really Big Colour Code: 117313504 Allen Smith311January 11, 2013 04:06PM
Re: Really Big Colour Code: 117313504 Travis Cobbs318January 11, 2013 04:49PM
Re: Really Big Colour Code: 117313504 Alex Taylor300January 12, 2013 05:38AM
Re: Really Big Colour Code: 117313504 Michael Heidemann293January 12, 2013 04:05PM
Re: Really Big Colour Code: 117313504 Alex Taylor305January 13, 2013 04:05AM
Re: Really Big Colour Code: 117313504 Michael Heidemann288January 13, 2013 10:35AM
Re: Really Big Colour Code: 117313504 Eric Himbeault272January 14, 2013 08:21AM
Re: Really Big Colour Code: 117313504 Roland Melkert378February 11, 2013 11:13AM
Re: Really Big Colour Code: 117313504 Michael Heidemann307February 11, 2013 02:00PM
Re: Really Big Colour Code: 117313504 Travis Cobbs327February 11, 2013 02:01PM
Re: Really Big Colour Code: 117313504 Allen Smith295February 11, 2013 02:29PM
Re: Really Big Colour Code: 117313504 Travis Cobbs294February 11, 2013 03:27PM
Re: Really Big Colour Code: 117313504 Travis Cobbs305February 11, 2013 03:30PM
Re: Really Big Colour Code: 117313504 Allen Smith304February 11, 2013 04:36PM
Re: Really Big Colour Code: 117313504 Martin James324February 12, 2013 12:51AM
Re: Really Big Colour Code: 117313504 Roland Melkert573February 12, 2013 11:43AM



Sorry, only registered users may post in this forum.

Click here to login