1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
|
{ 'name': "Colors are in a specified set"
, 'description': "All background and foreground colors used on a page should be in a specificed set"
, 'rules': [
{ 'image-appears': "Foregrounds"
, 'description': "Foreground colors are in a specified set"
, 'rule':
function() {
var allowableColors = [ '#000000', '#FFFFFF', '#3D3D3D', '#B4B4B4', '#4E4E4E', '#C2C2C2' ];
fiveui.query('').each(
function(i, elt) {
if ($(elt).css('color') in allowableColors) {
$(elt).addClass('reportColor');
}
});
}
},
{ 'image-appears': "Backgrounds"
, 'description': "Backgrounds colors are in a specified set"
, 'rule':
function() {
var allowableColors = [ 'transparent', '#000000', '#FFFFFF', '#3D3D3D', '#B4B4B4', '#4E4E4E', '#C2C2C2' ];
fiveui.query('').each(
function(i, elt) {
if ($(elt).css('color') in allowableColors) {
$(elt).addClass('reportBackColor');
}
});
}
}
]
}
|