Toward a Canvas and Color Picker: Week 3
How do I make an toward a canvas and color picker: week 3?
What is a toward a canvas and color picker: week 3? How do you make a toward a canvas and color picker: week 3? This script and codes were developed by Anshu Arora on 15 September 2022, Thursday.
Toward a Canvas and Color Picker: Week 3 - Script Codes HTML Codes
<!DOCTYPE html>
<html >
<head> <meta charset="UTF-8"> <title>Toward a Canvas and Color Picker: Week 3</title> <link rel="stylesheet" href="css/style.css">
</head>
<body> <h1>Toward a Canvas - Changing Div to Canvas</h1>
<canvas id="d1"> </canvas>
<p> <input type="button" value="make lime" onclick="dolime()"> <input type="color" value="#e2e036" id="clr" onchange="docolor()"> <input type="range" min="10" max="100"
value="10" id="sldr" oninput="dosquare()">
</p> <script src="js/index.js"></script>
</body>
</html>
Toward a Canvas and Color Picker: Week 3 - Script Codes CSS Codes
canvas { width: 300px; height: auto; border: 1px solid #c3c3c3;
}
Toward a Canvas and Color Picker: Week 3 - Script Codes JS Codes
function dolime() { var dd1 = document.getElementById("d1"); dd1.style.backgroundColor="lime";
}
function docolor() { var dd1 = document.getElementById("d1"); var colorinput = document.getElementById("clr"); var color = colorinput.value; dd1.style.backgroundColor = color;
}
function dosquare() { var dd1 = document.getElementById("d1"); var sizeinput = document.getElementById("sldr"); var size = sizeinput.value; var ctx = dd1.getContext("2d"); ctx.clearRect(0,0,dd1.width,dd1.height) ctx.fillStyle = "yellow" ctx.fillRect(10,10,size,size);
}
Developer | Anshu Arora |
Username | anshusaxenaarora |
Uploaded | September 15, 2022 |
Rating | 3 |
Size | 1,898 Kb |
Views | 30,360 |
Find the perfect freelance services for your business! Fiverr's mission is to change how the world works together. Fiverr connects businesses with freelancers offering digital services in 500+ categories. Find Developer!
Name | Size |
Anshu Arora Webpage | 6,034 Kb |
Class 1 Week 1 | 1,263 Kb |
Green Screen - Foreground and Background Images | 1,817 Kb |
A Pen by Anshu Arora | 1,558 Kb |
Webpage Example | 6,071 Kb |
Changing HTML Text with CSS and JS Week 3 | 1,829 Kb |
My Interests | 2,015 Kb |
Interests | 1,523 Kb |
Canvas for Live Coding | 1,799 Kb |
Upload and Display an Image | 1,938 Kb |
Jasper is the AI Content Generator that helps you and your team break through creative blocks to create amazing, original content 10X faster. Discover all the ways the Jasper AI Content Platform can help streamline your creative workflows. Start For Free!
Name | Username | Size |
Awesome | Samarthpd | 2,901 Kb |
Slide In Panel | Vikvarg | 2,811 Kb |
A Pen by Eka Risyana | Risyana | 3,705 Kb |
Board Site | IndianaLuft | 10,542 Kb |
CSS3 Selectables with information rollover | Jasonmayes | 9,565 Kb |
Vanilla JS - A toggleClass function | Woodwork | 2,532 Kb |
Formations | Cantelope | 5,731 Kb |
Resume | Rottingroom | 5,483 Kb |
Birthday Party Starter | Aussieyang | 1,629 Kb |
Long Shadow Button | Uixcrazy | 3,550 Kb |
Surf anonymously, prevent hackers from acquiring your IP address, send anonymous email, and encrypt your Internet connection. High speed, ultra secure, and easy to use. Instant setup. Hide Your IP Now!