Sha256: 4205009f561a7545515de82d26c0b756b78871f7a4eb7415e7c7f2b12ca644c7
Contents?: true
Size: 487 Bytes
Versions: 14
Compression:
Stored size: 487 Bytes
Contents
// Computes the "brightness" of a color // // Brightness is similiar to lightness in HSL but more closely approximates // how humans perceive the intensity of the different RGB components of // a color. Brightness is sometimes called luminance. // // Returns a number between 0% and 100%, where 100% is fully bright // (white) and 0% is fully dark (black). @function brightness($color) { @return ((red($color) * .299) + (green($color) * .587) + (blue($color) * .114)) / 255 * 100%; }
Version data entries
14 entries across 14 versions & 2 rubygems