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 Himbeault599January 11, 2013 08:32AM
Re: Really Big Colour Code: 117313504 Travis Cobbs238January 11, 2013 09:14AM
Re: Really Big Colour Code: 117313504 Travis Cobbs214January 11, 2013 09:17AM
Re: Really Big Colour Code: 117313504 Eric Himbeault222January 11, 2013 01:49PM
Re: Really Big Colour Code: 117313504 Travis Cobbs203January 11, 2013 02:38PM
Re: Really Big Colour Code: 117313504 Allen Smith240January 11, 2013 04:06PM
Re: Really Big Colour Code: 117313504 Travis Cobbs235January 11, 2013 04:49PM
Re: Really Big Colour Code: 117313504 Alex Taylor211January 12, 2013 05:38AM
Re: Really Big Colour Code: 117313504 Michael Heidemann229January 12, 2013 04:05PM
Re: Really Big Colour Code: 117313504 Alex Taylor217January 13, 2013 04:05AM
Re: Really Big Colour Code: 117313504 Michael Heidemann209January 13, 2013 10:35AM
Re: Really Big Colour Code: 117313504 Eric Himbeault202January 14, 2013 08:21AM
Re: Really Big Colour Code: 117313504 Roland Melkert298February 11, 2013 11:13AM
Re: Really Big Colour Code: 117313504 Michael Heidemann241February 11, 2013 02:00PM
Re: Really Big Colour Code: 117313504 Travis Cobbs248February 11, 2013 02:01PM
Re: Really Big Colour Code: 117313504 Allen Smith219February 11, 2013 02:29PM
Re: Really Big Colour Code: 117313504 Travis Cobbs231February 11, 2013 03:27PM
Re: Really Big Colour Code: 117313504 Travis Cobbs225February 11, 2013 03:30PM
Re: Really Big Colour Code: 117313504 Allen Smith232February 11, 2013 04:36PM
Re: Really Big Colour Code: 117313504 Martin James245February 12, 2013 12:51AM
Re: Really Big Colour Code: 117313504 Roland Melkert417February 12, 2013 11:43AM



Sorry, only registered users may post in this forum.

Click here to login