Dennis Forbes on Pragmatic Software Development   Subscribe to RSS


About the Author
Dennis Forbes is a Toronto-based software architect. While focused primarily on the .NET and SQL Server worlds, Dennis frequently ventures outside of this comfort zone into game development, Linux development, and image processing. He has been published in several industry magazines, has been quoted in the Wall Street Journal and has been interviewed by NPR.

He is a vice president and lead software architect at an innovative New York City hedge fund back-office services firm.

Dennis has been working on solutions for the financial, telecommunications, and power generation markets for over 13 years.


Recent Entries


The Feed Bag

 
Monday, October 24 2005

[UPDATE 2005-10-26 : One of the web tools is available at http://www.yafla.com/yaflaColor/ColorRGBHSL.aspx]

I have a couple of fun little web services that I worked on over the weekend that I'm going to stick on here in the coming days. One is a simple utility that allows you to punch in Hue/Saturation/Lightness (e.g. 327 degrees, 75% saturation, 55% lightness), or alternately an RGB combo (e.g. #8C235C), and it gives the alternative encoding (e.g. from RGB to HSL, or vice versa). Additionally, and usefully, it provides a listing of saturation/lightness variations so you can easily get correlated shades and saturations for color themes. This is really scratching my own itch, as I constantly find myself picking a base color, and then manually, and imprecisely, varying the RGB components to form a theme (e.g. a slightly lighter variation for a side element, a darker one to go behind another element, and so on).

HSL is a vastly superior way of dealing with colors, and is extraordinarily more intuitive than the 24-bit color-space RGB (e.g. #FF0000). Eventually HSL will be widely available via CSS 3, which means that you should be able to use it natively by around 2009 (if only I were joking...). HSL breaks color into its hue, which is from 0 to 360 degrees, saturation from 0 - 100%, and lightness from 0 - 100%. Understanding the relationship between RGB and HSL was eye opening to me, and I discovered that I had significant misperceptions about how they correlated.

To add to the usefulness, it also gives complimentary and triad colors, as well as complete color sets for your themeing fun based upon common color theory. Each of the colors are linked to be the new base color, so you can browse around to find the perfect collection. Fun little tool.

One other micro-application that I'm releasing, as a downloadable Win32 command-line EXE, is a tool that gives a weighted "suggested photo environment". It analyzes an image, using an outer weighting that you select, and recommends a core environment HSL for it to be contained within. You can then use that to create a color theme, and make gorgeous aesthetically pleasing pages, such that Flickr often does.

This tool alternately allows you to monotone an image to a given hue if that's your desire. e.g. to make a photo fit within an existing color theme. This will be a very easy, lightweight, free method of doing what you can do in most good imaging apps.

Anyways, just a "weekend update". This work was all for some R&D of something much different.

Reader Comments

Add Comment

Name *:

Email Address:

(your email address is not displayed)
Website:

Comment *:


Dennis Forbes