From 23d2f9e9243fdb14e3b6bd6c00b1278658a3e36b Mon Sep 17 00:00:00 2001
From: Phillip Phan <php46@drexel.edu>
Date: Mon, 1 May 2023 19:47:23 -0400
Subject: [PATCH] Turned hex codes to button; Ported palette names to
TruePalette
---
.DS_Store | Bin 6148 -> 6148 bytes
CI-ColorWebs/.DS_Store | Bin 8196 -> 8196 bytes
CI-ColorWebs/Pages/Index.cshtml | 12 ++++++------
CI-ColorWebs/Pages/TruePalette.cshtml | 16 ++++++++++------
CI-ColorWebs/wwwroot/js/truepalette.js | 14 +++++++++-----
5 files changed, 25 insertions(+), 17 deletions(-)
diff --git a/.DS_Store b/.DS_Store
index edba6e3e6be05a34a8cea0f5f21daeb0a847cfa2..490176a703672c02a0b03101fb892dbf2d16316e 100644
GIT binary patch
delta 181
zcmZoMXfc@J&&akhU^gQp+hjpz8EMa){N$vZ{3Hej1_1^J21f=42EG4az%W^WS$47p
zlPn|0WH+X0eooGK0g38rb5k=N1yc*t$s3q@7zHK^FiC_k=rI&C<S^u+nYA9tECvP!
p22O?`23H101{Vfj23H0>hFpdeR2_`62pyXpnblY}vvd6A2LNWYGByAJ
delta 61
zcmZoMXfc@J&&a$nU^gQp^JE?-naK%EvW)DL>zJbXIXL45B&w@T4UKdZOpGljzhLUw
R{DfJVWn#mM&Fmb1`2qTH5ySuh
diff --git a/CI-ColorWebs/.DS_Store b/CI-ColorWebs/.DS_Store
index 5c2685a23c94c847d70c093ac3da9c3608529981..b9f5e7ee059c0cfc1a5c8610eeea70d5c44de005 100644
GIT binary patch
delta 44
zcmZp1XmOa}&nUDpU^hRb&}JTi*NmI(g-)<eZ1C93F7b_J@_u29&9$OkOcNVi0a>39
A&Hw-a
delta 96
zcmZp1XmOa}&nUbxU^hRb@Ma!?*NnCz49N_c3`Gpd3^@#`3`q=$49N`H4CxF-4EYSD
z40#MG40;S%3<V77o;mr+NjdpR3=9kc3=E7l3=9l&Hop<P%(|If;v386ts?Bq0GC1-
AkpKVy
diff --git a/CI-ColorWebs/Pages/Index.cshtml b/CI-ColorWebs/Pages/Index.cshtml
index 7893138..9176e80 100644
--- a/CI-ColorWebs/Pages/Index.cshtml
+++ b/CI-ColorWebs/Pages/Index.cshtml
@@ -29,12 +29,12 @@
<span id="palName" class = "paletteName"></span>
<br>
<br>
- <span id="color"></span>
- <span id="color2"></span>
- <span id="color3"></span>
- <span id="color4"></span>
- <span id="color5"></span>
- <span id="color6"></span>
+ <button id="color"></button>
+ <button id="color2"></button>
+ <button id="color3"></button>
+ <button id="color4"></button>
+ <button id="color5"></button>
+ <button id="color6"></button>
<canvas width="700"></canvas>
</h2>
<h3>
diff --git a/CI-ColorWebs/Pages/TruePalette.cshtml b/CI-ColorWebs/Pages/TruePalette.cshtml
index 504b487..d512f04 100644
--- a/CI-ColorWebs/Pages/TruePalette.cshtml
+++ b/CI-ColorWebs/Pages/TruePalette.cshtml
@@ -15,12 +15,16 @@
<h2>
<button id="gsetNew">Generate New Set Palette</button>
<br>
- <span id="palColor"></span>
- <span id="palColor2"></span>
- <span id="palColor3"></span>
- <span id="palColor4"></span>
- <span id="palColor5"></span>
- <span id="palColor6"></span>
+ <br>
+ <span id="palNameTrue" class = "paletteNameTrue"></span>
+ <br>
+ <br>
+ <button id="palColor"></button>
+ <button id="palColor2"></button>
+ <button id="palColor3"></button>
+ <button id="palColor4"></button>
+ <button id="palColor5"></button>
+ <button id="palColor6"></button>
<canvas width = "700"></canvas>
</h2>
<h3>
diff --git a/CI-ColorWebs/wwwroot/js/truepalette.js b/CI-ColorWebs/wwwroot/js/truepalette.js
index 2fa4fc3..22b96f9 100644
--- a/CI-ColorWebs/wwwroot/js/truepalette.js
+++ b/CI-ColorWebs/wwwroot/js/truepalette.js
@@ -43,7 +43,7 @@ const bre = () => {
dict[37] = "#FFB1B9 #FACBBA #F0CC96 #5B5759 #D5E8E2 #7ADDD1";
dict[38] = "#2B78A2 #6EA8C9 #B6DEE7 #FCD9DD #F9E2CF #F2CDAF";
dict[39] = "#FCEDBE #F6CF80 #EE816A #F7C9D3 #EE84A8 #D35A7F";
- dict[40] = "#5F98A9 #8AB6C6 #BDD7DF #E7BB8D #F2D6B8#E5E5E5";
+ dict[40] = "#5F98A9 #8AB6C6 #BDD7DF #E7BB8D #F2D6B8 #E5E5E5";
dict[41] = "#E58E61 #F3BE95 #3D6E8D #CCDA9C #E8D5CF #F2EBE5";
dict[42] = "#D1A4BD #B87A9E #F8C865 #FFA755 #D04A3E #C2845E";
dict[43] = "#134080 #1D6590 #EF978F #FFC2AD #FFDFAC #1E2236";
@@ -54,9 +54,7 @@ const bre = () => {
dict[48] = "#99D0D9 #5C9DBA #4D6782 #726286 #D7AC93 #926851";
dict[49] = "#EFCFC5 #D77F57 #E2A388 #86C7CC #41A8A8 #DAE6E7";
dict[50] = "#F0D0C7 #DEB49F #EBB1A3 #EEA8AB #F5B8BC #837881";
-
-
-
+
let number = Math.floor(Math.random() * 49) + 1;
const phrase = dict[number];
const words = phrase.split(' ');
@@ -65,7 +63,13 @@ const bre = () => {
{
leColor.push(words[i]);
}
-
+ const namesFirst = ["Beautiful ", "Splash of ", "Colorful ", "Dreary ", "Radiant " ,"Vibrant ", "Awe Struck ", "Taste of ", "True "];
+ const namesLast = ["Morning", "Color", "Dreams", "Inspiration", "Wonder", "Midnight", "Hue" , "Paradise", "Passion"];
+ const genNameFirst = namesFirst[Math.floor(Math.random() * 9)];
+ const genNameLast = namesLast[Math.floor(Math.random() * 9)];
+ palNameTrue.innerHTML = "\""+genNameFirst + genNameLast+"\"";
+ document.getElementById("palNameTrue").style.fontSize = "xx-large";
+
palColor.innerHTML = leColor[0];
context.fillStyle = leColor[0];
context.fillRect(0, 0, 116, 150);
--
GitLab