Relative Color
October 9, 2008
I have been thinking for the last week about how I would like to create a relative-color algorithm for improving the versatility of my CSS style sheets.
Let me explain better: Text-size can be relative (sizing with ems or percentage). Spacing can be relative (also with ems). But color, or even simply – visual contrast – is not so easily relatively created.
Jonathan Snook provides a wonderful color contrast tool that takes any two given colors and provides an output on visual contrast. The intent behind the tool was to compare two colors that you have and see if it meets or exceeds the W3C’s suggested contrast levels.
I will be working on taking the algorithms used to compare the colors, and reverse-engineer them to make a relative style sheet.
Given that I’m in the Hospital right now taking care of my newborn baby girl and my beautiful wife, I will post later how I plan on going about making these stylesheets after I’ve created my algorithm using PHP.