ucla-oarc-web / WebBlocks

Out of the box, WebBlocks is a platform based on modern web technologies for building full-featured, responsive sites suited for all viewports including desktops, tablets and mobile devices. It leverages existing best-in-breed web tools, defines semantics based on modern web standards and includes a large suite of UI elements and Javascript interactivity libraries. However, WebBlocks is a lot more than just a set of semantics, elements and libraries. At it's core, it is a highly modular toolkit that can be customized to meet business needs, fitted to different development paradigms and integrated into existing web solutions.
http://ucla.github.io/WebBlocks/doc
BSD 3-Clause "New" or "Revised" License
21 stars 14 forks source link

Improve $color- Computations for Light Variant #255

Closed ebollens closed 11 years ago

ebollens commented 11 years ago

The core adapter takes the $color- variables and computes out a number of shades, such as those used for the light variant. Unfortunately, because of the percentage-based calculation, a definition like $color-branding-primary: #FFAAAA; causes the light variant to just show up white. Need to use the color value to set the hue, not the lightness.

This pertains to the changes made in #124.

ebollens commented 11 years ago

The commit 46a88e1 tweaks light color implementation to use hsv whereby the hue and saturation are extracted from the base color but the value comes from a lightness percentage. Benefit to use of hsv value attribute over computing some percentage of assigned values in rgb is that hsv is a cylindrical coordinate representation of color while rgb is a cubic coordinate representation, meaning that the hsv approach produces consistently light colors as opposed to the rgb one (consider YIQ conversion as an example of how red, green and blue have unequal luminosity).