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 |
Class 1 Week 1 | 1,263 Kb |
Webpage Example | 6,071 Kb |
Green Screen - Foreground and Background Images | 1,817 Kb |
Changing HTML Text with CSS and JS Week 3 | 1,829 Kb |
Canvas for Live Coding | 1,799 Kb |
A Pen by Anshu Arora | 1,558 Kb |
Upload and Display an Image | 1,938 Kb |
My Interests | 2,015 Kb |
Anshu Arora Webpage | 6,034 Kb |
Interests | 1,523 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 |
Flat UI Button | Honchoman | 2,289 Kb |
The Monty Hall Problem | Melatonind | 4,360 Kb |
Sencha Touch 2.3.1 Basic Grid Example | Trozdol | 2,770 Kb |
Gradients | Karpovsystems | 2,394 Kb |
Next Word Predictor | Rfalor | 2,776 Kb |
Codero Sitemap | S1m0ne | 28,169 Kb |
Flex Chart | James_zedd | 4,111 Kb |
Social buttons | Flacu | 2,022 Kb |
A Pen by Adrien Clerbois | AClerbois | 6,501 Kb |
Responsive Minimal Blog Layout | Hackthevoid | 5,261 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!