samedi 4 avril 2015

Representing LED colours with CSS

I'm trying to represent the colour displayed on an LED with CSS. Obviously it's easy to use the background property with RGBa, however obviously black cannot be represented with LEDs.


Let's use red as an example:


For an LED, at full brightness, the LED will display red. However as the value decreases from 255 down to 0, it is similar to the transparency decreasing.


So the representation of RGB(0, 0, 0) should be a transparent background, rather than black. However, I'm not entirely sure how to work this out?





Aucun commentaire:

Enregistrer un commentaire