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

Version Path
compass-core-1.0.0.alpha.20 stylesheets/compass/utilities/color/_brightness.scss
compass-core-1.0.0.alpha.19 stylesheets/compass/utilities/color/_brightness.scss
compass-core-1.0.0.alpha.17 stylesheets/compass/utilities/color/_brightness.scss
compass-core-1.0.0.alpha.16 stylesheets/compass/utilities/color/_brightness.scss
compass-core-1.0.0.alpha.15 stylesheets/compass/utilities/color/_brightness.scss
compass-core-1.0.0.alpha.14 stylesheets/compass/utilities/color/_brightness.scss
compass-core-1.0.0.alpha.13 stylesheets/compass/utilities/color/_brightness.scss
compass-0.13.alpha.12 frameworks/compass/stylesheets/compass/utilities/color/_brightness.scss
compass-0.13.alpha.10 frameworks/compass/stylesheets/compass/utilities/color/_brightness.scss
compass-0.13.alpha.9 frameworks/compass/stylesheets/compass/utilities/color/_brightness.scss
compass-0.13.alpha.8 frameworks/compass/stylesheets/compass/utilities/color/_brightness.scss
compass-0.13.alpha.7 frameworks/compass/stylesheets/compass/utilities/color/_brightness.scss
compass-0.13.alpha.6 frameworks/compass/stylesheets/compass/utilities/color/_brightness.scss
compass-0.13.alpha.5 frameworks/compass/stylesheets/compass/utilities/color/_brightness.scss