Nathan Hall před 6 roky
rodič
revize
7a3d697f88
2 změnil soubory, kde provedl 14 přidání a 13 odebrání
  1. 13
    12
      js/colors.js
  2. 1
    1
      js/index.js

+ 13
- 12
js/colors.js Zobrazit soubor

@@ -1,5 +1,5 @@
1
-var colorsArray : {
2
-    colors=[
1
+var colorsArray = {
2
+    colors: [
3 3
         {
4 4
             "name":"green",
5 5
             "red":"64",
@@ -13,11 +13,11 @@ var colorsArray : {
13 13
             "blue":"62"
14 14
         },
15 15
         {
16
-            name:"red",
17
-            red:"192",
18
-            green:"46",
19
-            blue:"35"
20
-        }
16
+            "name":"red",
17
+            "red":"192",
18
+            "green":"46",
19
+            "blue":"35"
20
+        },
21 21
         {
22 22
             "name":"blue",
23 23
             "red":"19",
@@ -25,9 +25,10 @@ var colorsArray : {
25 25
             "blue":"144",
26 26
         },
27 27
         {
28
-            "name"="orange",
29
-            "red"="253",
30
-            "green"="92",
31
-            "blue"="48"
32
-        },
28
+            "name":"orange",
29
+            "red":"253",
30
+            "green":"92",
31
+            "blue":"48"
32
+        }
33 33
     ]
34
+}

+ 1
- 1
js/index.js Zobrazit soubor

@@ -39,7 +39,7 @@ window.onload = function()
39 39
 		this.g = Math.round(Math.random()*255);
40 40
 		this.b = Math.round(Math.random()*255);*/
41 41
 
42
-		this.randomColor = randomInt(0,colorsArray.colors.length-1);
42
+		this.randomColor = randomInt(0, colorsArray.colors.length-1);
43 43
 		this.r = colorsArray.colors[this.randomColor].red;
44 44
 		this.g = colorsArray.colors[this.randomColor].green;
45 45
 		this.b = colorsArray.colors[this.randomColor].blue;