-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.html
42 lines (42 loc) · 1.34 KB
/
index.html
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
<!doctype html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>Color contrast</title>
<link href="./style.css" rel="stylesheet" />
</head>
<body class="">
<div class="container" id="container">
<div class="box box--white">text content</div>
<div class="box box--yellow">text content</div>
<div class="box box--orange">text content</div>
<div class="box box--transparent"></div>
<div class="box box--green">
<span class="tamil"> tamil </span>
<span>text content</span>
</div>
<div class="box box--dummy" id="dummyContent">
<span class="tamil"> tamil </span>
<span>text content</span>
</div>
</div>
<script src="./dist/iife/colorContrast.js"></script>
<script>
try {
const getChecker = new colorContrast.ColorContrastChecker();
getChecker.init();
setTimeout(() => {
const divElement = document.createElement("div");
divElement.classList.add("box", "box--red");
divElement.textContent = "dummy element";
container.appendChild(divElement);
const dummyContent = document.querySelector("#dummyContent");
dummyContent.style.backgroundColor = "#fff";
}, 2000);
} catch (error) {
console.error("Error initializing ColorContrastChecker:", error.message);
}
</script>
</body>
</html>