fixed typo in Function::bind[WithArgs] docs
[mootools/dkf.git] / Specs / Utilities / Color.js
blob205ea874d3b3181f640f2d84c23f2c8d84047993
1 var myColor;
2 //colors compared with photoshop values.
4 describe('Color constructor, hex', {
6         'before all': function(){
7                 myColor = new Color('#a2c240');
8         },
10         'should have the correct rgb': function(){
11                 value_of(myColor).should_be([162, 194, 64]);
12         },
14         'should have the correct hsb': function(){
15                 value_of(myColor.hsb).should_be([75, 67, 76]);
16         },
18         'should have the correct hex': function(){
19                 value_of(myColor.hex).should_be('#a2c240');
20         }
22 });
24 describe('Color constructor, hsb', {
26         'before all': function(){
27                 myColor = new Color('hsb(75, 67, 76)');
28         },
30         'should have the correct rgb': function(){
31                 value_of(myColor).should_be([161, 194, 64]);
32         },
34         'should have the correct hsb': function(){
35                 value_of(myColor.hsb).should_be([75, 67, 76]);
36         },
38         'should have the correct hex': function(){
39                 value_of(myColor.hex).should_be('#a1c240');
40         }
42 });
44 describe('Color constructor, rgb', {
46         'before all': function(){
47                 myColor = new Color('rgb(162, 194, 64)');
48         },
50         'should have the correct rgb': function(){
51                 value_of(myColor).should_be([162, 194, 64]);
52         },
54         'should have the correct hsb': function(){
55                 value_of(myColor.hsb).should_be([75, 67, 76]);
56         },
58         'should have the correct hex': function(){
59                 value_of(myColor.hex).should_be('#a2c240');
60         }
62 });