butteff / is_dark_ruby_gem Goto Github PK
View Code? Open in Web Editor NEWDetects a dark color based on luminance W3 standarts ( https://www.w3.org/TR/WCAG20/#relativeluminancedef ). It has these options: is a hex color dark; is an Imagick pixel dark; is an Imagick pixel from a blob dark; is an area in a blob over a dark background. It can be useful to understand will a black colored text be visible or not over an area.
Home Page: https://rubygems.org/gems/is_dark