Sha256: b187046fb9e89941a14984a55bb5327f8d6f40ff345b54121025eecf145037d5
Contents?: true
Size: 559 Bytes
Versions: 2
Compression:
Stored size: 559 Bytes
Contents
@charset "UTF-8"; /// Programatically determines whether a color is light or dark. /// /// @link http://goo.gl/Dil4Y9 /// /// @argument {color (hex)} $hex-color /// /// @example scss /// is-light($color) /// /// @return {boolean} /// /// @access private @function _is-light($hex-color) { $-local-red: red(rgba($hex-color, 1)); $-local-green: green(rgba($hex-color, 1)); $-local-blue: blue(rgba($hex-color, 1)); $-local-lightness: ($-local-red * 0.2126 + $-local-green * 0.7152 + $-local-blue * 0.0722) / 255; @return $-local-lightness > 0.6; }
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
bourbon-5.0.0.beta.3 | core/bourbon/validators/_is-light.scss |
bourbon-5.0.0.beta.2 | core/bourbon/validators/_is-light.scss |