Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 4 additions & 15 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,15 +1,4 @@
# ColorFlipperAssignment

Recreate the color flipper as demonstrated on 9th July session.
Instead of using RGB colorspace, use hex notation

e.g. White in rgb is rgb(255,255,255) and in hex is #000000


# Instructions to upload

- Fork the repository
- Create a new branch (with your name)
- Upload files in the new branch.
- Create a pull request.

# Soumyadeep Das
# BCA 1B
# 211001102090
#This is used for assignment submission purpose
21 changes: 21 additions & 0 deletions index.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
<!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">
<title>Document</title>
<link rel="stylesheet" type="text/css" href="style.css">
<script src="./script.js"></script>
</head>
<body ><center>
<div id="reg-form">
<form>
<p id ="i1"><div id="output"></div></p>
<h1 id="F1">
<input type = "button" class="button" onclick = "generate()" value = "Generate a Random Colour"></input> </h1>
</div></form>


</center></body>
</html>
13 changes: 13 additions & 0 deletions script.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
function generate()
{
var a=(Math.floor(Math.random()*16777215)).toString(16);
document.getElementById('output').innerText = a;
document.body.style.backgroundColor = "#" + a;
color.innerHTML = "#" + a;
console.log(a)


}
generate()


30 changes: 30 additions & 0 deletions style.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
#reg-form{
background-color:#000000;
color:white;
font-family:'Lucida Sans', 'Lucida Sans Regular', 'Lucida Grande', 'Lucida Sans Unicode', Geneva, Verdana, sans-serif;
font-style:oblique;
font-size: xx-large;
width: 200px;
padding: 100px 100px 100px 100px;
margin: 180px ;
opacity: 1;
border-radius: 40px;

}

#i1{
opacity: 0.9;
}
.button {
background-color: #ffffff;
border: none;
color:black;
padding: 16px 10px;
text-align: center;
text-decoration: none;
display: inline-block;
font-family: 'Lucida Sans', 'Lucida Sans Regular', 'Lucida Grande', 'Lucida Sans Unicode', Geneva, Verdana, sans-serif;
font-style:initial;
font-size: 16px;
border-radius: 30px;
}