Sha256: bc7101acbd2b1379aac64774765be2aafdce45a0086d5c19fac540566b5b930e
Contents?: true
Size: 838 Bytes
Versions: 1
Compression:
Stored size: 838 Bytes
Contents
require 'spec_helper' describe Coloruby do it '#lighten' do expect(Coloruby.lighten('#000000')).to eql('#4d4d4d') end it '#darken' do expect(Coloruby.darken('#990000')).to eql('#2e0000') end it '#hex_to_rgb' do expect(Coloruby.hex_to_rgb('#ffffff')).to eql([255, 255, 255]) end it '#rgb_to_hex' do expect(Coloruby.rgb_to_hex([255, 255, 255])).to eql('#ffffff') end it '#light_or_dark?' do expect(Coloruby.light_or_dark?('#000000')).to eql('dark') expect(Coloruby.light_or_dark?('#ffffff')).to eql('light') end it '#dark?' do expect(Coloruby.dark?('#000000')).to eql(true) expect(Coloruby.dark?('#ffffff')).to eql(false) end it '#light?' do expect(Coloruby.light?('#ffffff')).to eql(true) expect(Coloruby.light?('#000000')).to eql(false) end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
coloruby-0.0.1 | spec/coloruby_spec.rb |