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 Himbeault739January 11, 2013 08:32AM
Re: Really Big Colour Code: 117313504 Travis Cobbs273January 11, 2013 09:14AM
Re: Really Big Colour Code: 117313504 Travis Cobbs251January 11, 2013 09:17AM
Re: Really Big Colour Code: 117313504 Eric Himbeault265January 11, 2013 01:49PM
Re: Really Big Colour Code: 117313504 Travis Cobbs240January 11, 2013 02:38PM
Re: Really Big Colour Code: 117313504 Allen Smith288January 11, 2013 04:06PM
Re: Really Big Colour Code: 117313504 Travis Cobbs292January 11, 2013 04:49PM
Re: Really Big Colour Code: 117313504 Alex Taylor268January 12, 2013 05:38AM
Re: Really Big Colour Code: 117313504 Michael Heidemann274January 12, 2013 04:05PM
Re: Really Big Colour Code: 117313504 Alex Taylor274January 13, 2013 04:05AM
Re: Really Big Colour Code: 117313504 Michael Heidemann256January 13, 2013 10:35AM
Re: Really Big Colour Code: 117313504 Eric Himbeault245January 14, 2013 08:21AM
Re: Really Big Colour Code: 117313504 Roland Melkert352February 11, 2013 11:13AM
Re: Really Big Colour Code: 117313504 Michael Heidemann287February 11, 2013 02:00PM
Re: Really Big Colour Code: 117313504 Travis Cobbs301February 11, 2013 02:01PM
Re: Really Big Colour Code: 117313504 Allen Smith268February 11, 2013 02:29PM
Re: Really Big Colour Code: 117313504 Travis Cobbs271February 11, 2013 03:27PM
Re: Really Big Colour Code: 117313504 Travis Cobbs279February 11, 2013 03:30PM
Re: Really Big Colour Code: 117313504 Allen Smith282February 11, 2013 04:36PM
Re: Really Big Colour Code: 117313504 Martin James300February 12, 2013 12:51AM
Re: Really Big Colour Code: 117313504 Roland Melkert523February 12, 2013 11:43AM



Sorry, only registered users may post in this forum.

Click here to login