diff --git a/RandomColorGenerator/AdyaTech/index.html b/RandomColorGenerator/AdyaTech/index.html new file mode 100644 index 000000000..a492fe365 --- /dev/null +++ b/RandomColorGenerator/AdyaTech/index.html @@ -0,0 +1,30 @@ + + + + + + Document + + + + +
+
+

Random Hex Color Generator

+ #ffffff +
+
+ +
+
+
+ + + + diff --git a/RandomColorGenerator/AdyaTech/script.js b/RandomColorGenerator/AdyaTech/script.js new file mode 100644 index 000000000..5fbc50ed8 --- /dev/null +++ b/RandomColorGenerator/AdyaTech/script.js @@ -0,0 +1,18 @@ +const hex = document.querySelector(".hex"); +const btn = document.querySelector(".generate"); + +const generateColor = () => { + const randomColor = Math.random().toString(16).substring(2, 8); + document.body.style.backgroundColor = "#" + randomColor; + hex.innerHTML = "#" + randomColor; +}; + +btn.addEventListener("click", generateColor); + +generateColor(); + +// let color = Math.random(); +// color = Math.random().toString(16); +// color = Math.random().toString(16).substring(2, 8); + +// console.log(color); diff --git a/RandomColorGenerator/AdyaTech/styles.css b/RandomColorGenerator/AdyaTech/styles.css new file mode 100644 index 000000000..704ed0706 --- /dev/null +++ b/RandomColorGenerator/AdyaTech/styles.css @@ -0,0 +1,93 @@ +@import url("https://fonts.googleapis.com/css2?family=Open+Sans:wght@300;400;600;700&display=swap"); + +:root { + --white: #fff; + --black: #1c2b2d; + --blue: #31326f; + --light-blue: #005490; + --color-primary: #9d0191; + --color-sec: #db6400; + --grey: #eee; + --dark-grey: #222831; +} + +* { + margin: 0; + padding: 0; + box-sizing: border-box; +} + +html { + font-size: 10px; +} + +body { + font-family: "Open Sans", sans-serif; +} + +p { + font-size: 1.6rem; + line-height: 1.5; +} + +img { + width: 100%; +} + +.container { + max-width: 900px; + margin: 0 auto; + padding: 0 20px; + display: flex; + justify-content: center; + align-items: center; + height: 100vh; +} + +.counter-div { + width: 40rem; + border: 1px solid var(--grey); + padding: 3rem; + background-color: var(--light-blue); + color: var(--white); + text-align: center; + border-radius: 5px; +} + +.counter-div > * { + margin-bottom: 2rem; +} + +.count{ + font-size: 2rem; +} +/* .count { + font-size: 2rem; + border: 1px solid var(--white); + padding: 8 3rem; +} +.count-hex{ + padding-left: 4rem ; +} */ +.buttons button { + padding: 1rem; + margin: 0 1rem; + font-size: 1.5rem; + color: var(--white); + font-weight: 700; + border: none; + outline: none; + border-radius: 3px; + cursor: pointer; +} + +button.subtract { + background-color: orangered; +} +button.reset { + background-color: var(--white); + color: var(--black); +} +button.add { + background-color: green; +}