-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathindex.html
More file actions
228 lines (213 loc) · 8.18 KB
/
index.html
File metadata and controls
228 lines (213 loc) · 8.18 KB
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
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta name="description" content="">
<meta name="author" content="">
<title>Color Picker for color contrast test</title>
<!-- Bootstrap core CSS -->
<link href="css/bootstrap.min.css" rel="stylesheet">
<!-- Bootstrap theme -->
<link href="css/bootstrap-theme.min.css" rel="stylesheet">
<!-- font awesome -->
<link href="css/font-awesome-old.css" rel="stylesheet">
<!-- jquery-ui.css -->
<link href="css/jquery-ui-1.8.16.custom.css" rel="stylesheet">
<!-- Sticky footer -->
<link href="css/sticky-footer.css" rel="stylesheet">
<!-- Custom styles for this template -->
<link href="css/theme.css" rel="stylesheet">
<script src="js/jquery-1.10.2.min.js"></script>
<script src="js/jquery-ui.min.js"></script>
<script src="js/rangy-core.js"></script>
<script src="js/jscolor.js"></script>
<script src="js/bootstrap.min.js"></script>
<script src="js/hallo.js"></script>
<script src="js/custom.js"></script>
<!-- HTML5 shim and Respond.js IE8 support of HTML5 elements and media queries -->
<!--[if lt IE 9]>
<script src="https://oss.maxcdn.com/libs/html5shiv/3.7.0/html5shiv.js"></script>
<script src="https://oss.maxcdn.com/libs/respond.js/1.3.0/respond.min.js"></script>
<![endif]-->
</head>
<body>
<!-- Fixed navbar -->
<div class="navbar navbar-inverse navbar-fixed-top" role="navigation">
<div class="container">
<div class="navbar-header">
<!-- <button type="button" class="navbar-toggle" data-toggle="collapse" data-target=".navbar-collapse">
<span class="sr-only">Toggle navigation</span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
</button> -->
<a class="navbar-brand" href="#">Color Picker for Color Contrast Test</a>
</div>
<!-- <div class="navbar-collapse collapse">
<ul class="nav navbar-nav">
<li class="active"><a href="#">Home</a></li>
</ul>
</div> --><!--/.nav-collapse -->
</div>
</div>
<div class="container theme-showcase">
<!-- Main jumbotron for a primary marketing message or call to action -->
<!-- <div class="jumbotron">
<h1>Hello, world!</h1>
<p>This is a template for a simple marketing or informational website. It includes a large callout called a jumbotron and three supporting pieces of content. Use it as a starting point to create something more unique.</p>
<p><a href="#" class="btn btn-primary btn-lg" role="button">Learn more »</a></p>
</div> -->
<div class="page-header">
<h1>Let's Start!</h1>
</div>
<div class="col-sm-4">
<div class="panel panel-primary">
<div class="panel-heading">
<h3 class="panel-title">Write some text</h3>
</div>
<div class="panel-body">
<div id="preview-text" class="center-block">
<br><br>
Click here and start typing
<br><br>
<b>
Highlight the text to change the font style
</b>
<br><br>
<i>
Go to the next panel
<br>
select color and font size
</i>
</div>
</div>
</div>
</div>
<div class="col-sm-4">
<div class="panel panel-info">
<div class="panel-heading">
<h3 class="panel-title">Do some styling</h3>
</div>
<div class="panel-body">
<div id="picker-container">
<form role="form">
<div class="form-group">
<label for="colorBg" class="control-label">Background Color</label>
<input id="colorBg" class="color {pickerPosition: 'bottom right ', onImmediateChange:'updateBackgroundColor(this);'} form-control" value="FFE957" />
</div>
<div class="form-group">
<label for="colorText" class="control-label">Text Color</label>
<input id="colorText" class="color {pickerPosition: 'bottom', onImmediateChange:'updateTextColor(this);'} form-control" value="960000" />
</div>
<div class="form-group">
<label for="inputFontSize" class="control-label">Font Size (in px)</label>
<input id="inputFontSize" class="form-control" value="20"/>
</div>
</form>
</div>
</div>
</div>
</div>
<div class="col-sm-4">
<div id="panel-result" class="panel panel-primary">
<div class="panel-heading">
<h3 class="panel-title">Here's your result</h3>
</div>
<div class="panel-body">
<p>
Color Contrast Ratio :
<span id="result-ratio"></span>
</p>
<p>
<table class="table table-bordered table-responsive">
<tr>
<td>WCAG 2 AA Compliant </td>
<td>
<span></span>
<span id="result-aa"></span>
</td>
</tr>
<tr>
<td>WCAG 2 AA Compliant (18pt+)</td>
<td>
<span></span>
<span id="result-aa-18"></span>
</td>
</tr>
<tr>
<td>WCAG 2 AAA Compliant </td>
<td>
<span></span>
<span id="result-aaa"></span>
</td>
</tr>
<tr>
<td>WCAG 2 AAA Compliant (18pt+)</td>
<td>
<span></span>
<span id="result-aaa-18"></span>
</td>
</tr>
</table>
</p>
</div>
</div>
</div>
<div class="clearfix">
</div>
<div class="well">
<p>
The WCAG 2.0 formula differentiates between text smaller than 18pt and text larger than 18pt (or text that is bold and larger than 14pt).
</p>
<p>
For <b>AA compliance</b>, text should have a ratio of <b>at least 4.5:1 (larger text, at least 3:1)</b>.
</p>
<p>
For <b>AAA compliance</b>, text should have a ratio of <b>at least 7:1 (larger text, at least 4.5:1)</b>.
</p>
</div>
<div class="panel panel-info">
<div class="panel-heading">
<h3 class="panel-title">Reference</h3>
</div>
<div class="panel-body">
<ul>
<li>Contrast Ratio: <a href="http://www.w3.org/TR/WCAG20/#contrast-ratiodef" target="_blank">
http://www.w3.org/TR/WCAG20/#contrast-ratiodef</a>
</li>
<li>Relative Luminance: <a href="http://www.w3.org/TR/WCAG20/#relativeluminancedef" target="_blank">
http://www.w3.org/TR/WCAG20/#relativeluminancedef</a>
</li>
</ul>
</div>
</div>
<div class="panel panel-info">
<div class="panel-heading">
<h3 class="panel-title">Credits</h3>
</div>
<div class="panel-body">
<ul>
<li>
HTML Color Picker - <a href="http://jscolor.com" target="_blank">jscolor.js</a>
</li>
<li>
Inline Web Editor - <a href="http://hallojs.org" target="_blank">hallo.js</a>
</li>
<li>
Front-end Framework - <a href="http://getbootstrap.com" target="_blank">bootstrap.js</a>
</li>
</ul>
</div>
</div>
</div> <!-- /container -->
<div id="footer">
<div class="container">
<p class="text-muted">
<a href="https://github.com/xming13" target="_blank">xming13@Github</a>
</p>
</div>
</div>
</body>
</html>