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 Himbeault759January 11, 2013 08:32AM
Re: Really Big Colour Code: 117313504 Travis Cobbs282January 11, 2013 09:14AM
Re: Really Big Colour Code: 117313504 Travis Cobbs258January 11, 2013 09:17AM
Re: Really Big Colour Code: 117313504 Eric Himbeault273January 11, 2013 01:49PM
Re: Really Big Colour Code: 117313504 Travis Cobbs245January 11, 2013 02:38PM
Re: Really Big Colour Code: 117313504 Allen Smith292January 11, 2013 04:06PM
Re: Really Big Colour Code: 117313504 Travis Cobbs300January 11, 2013 04:49PM
Re: Really Big Colour Code: 117313504 Alex Taylor279January 12, 2013 05:38AM
Re: Really Big Colour Code: 117313504 Michael Heidemann282January 12, 2013 04:05PM
Re: Really Big Colour Code: 117313504 Alex Taylor281January 13, 2013 04:05AM
Re: Really Big Colour Code: 117313504 Michael Heidemann263January 13, 2013 10:35AM
Re: Really Big Colour Code: 117313504 Eric Himbeault253January 14, 2013 08:21AM
Re: Really Big Colour Code: 117313504 Roland Melkert358February 11, 2013 11:13AM
Re: Really Big Colour Code: 117313504 Michael Heidemann292February 11, 2013 02:00PM
Re: Really Big Colour Code: 117313504 Travis Cobbs309February 11, 2013 02:01PM
Re: Really Big Colour Code: 117313504 Allen Smith273February 11, 2013 02:29PM
Re: Really Big Colour Code: 117313504 Travis Cobbs278February 11, 2013 03:27PM
Re: Really Big Colour Code: 117313504 Travis Cobbs288February 11, 2013 03:30PM
Re: Really Big Colour Code: 117313504 Allen Smith285February 11, 2013 04:36PM
Re: Really Big Colour Code: 117313504 Martin James306February 12, 2013 12:51AM
Re: Really Big Colour Code: 117313504 Roland Melkert542February 12, 2013 11:43AM



Sorry, only registered users may post in this forum.

Click here to login