Color Palette Changer
How do I make an color palette changer?
Change the color scheme of a whole page by selecting different palettes from a menu.. What is a color palette changer? How do you make a color palette changer? This script and codes were developed by Rich Wertz on 29 January 2023, Sunday.
Color Palette Changer - Script Codes HTML Codes
<!DOCTYPE html>
<html >
<head> <meta charset="UTF-8"> <title>Color Palette Changer</title> <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/normalize/5.0.0/normalize.min.css"> <link rel="stylesheet" href="css/style.css">
</head>
<body> <body data-palette="1"> <div class="bg"> <article> <h1>LET'S GO PENS!!!</h1> </article> <p>Change this color scheme: <select name="palette"> <option value="1">Default</option> <option value="2">Black & Gold</option> <option value="3">Gold & Black</option> </select> </p> </div>
</body> <script src="js/index.js"></script>
</body>
</html>
Color Palette Changer - Script Codes CSS Codes
body { display: block; width: 100%; height: 100%; margin: 0; padding: 0; font-family: Trebuchet MS, sans-serif; font-size: 16px; background: #fff; color: #000;
}
.bg { background: url("https://s3-us-west-2.amazonaws.com/s.cdpn.io/329887/StanleyCup.png") no-repeat right 10px; min-height: 960px;
}
h1 { font-size: 3em; font-weight: bold; padding: 20px;
}
p { padding: 20px;
}
[data-palette] { transition: background 1s, color 1s;
}
[data-palette="1"] { background: #fff; color: #000;
}
[data-palette="2"] { background: #0d0d0d; color: #F2A71B;
}
[data-palette="3"] { background: #F2A71B; color: #0d0d0d;
}
Color Palette Changer - Script Codes JS Codes
window.addEventListener("load", function() { document.querySelector('[name="palette"]').addEventListener("change", function() { document.body.setAttribute("data-palette", this.value) });
});
Developer | Rich Wertz |
Username | richwertz |
Uploaded | January 29, 2023 |
Rating | 3 |
Size | 2,137 Kb |
Views | 6,072 |
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 |
Vertical-align-vertical-height | 2,232 Kb |
Reduce Navigation Interaction Voids | 1,981 Kb |
Image Slide In Effect | 1,989 Kb |
Animated Title Effect | 1,860 Kb |
SCSS basics | 1,824 Kb |
Video-background | 2,002 Kb |
Fullscreen Menu | 10,483 Kb |
Hamburger Menu Animation | 1,827 Kb |
Loading Animation Example | 1,719 Kb |
Dynamic Animated Effect | 1,844 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 |
Twitch JSON API | Jvhti | 2,808 Kb |
Static Image to Video Block | Grayghostvisuals | 4,864 Kb |
GrcJS | Vino6 | 2,047 Kb |
Apex Calculator | Michaelwnelson | 2,370 Kb |
Login with flip 3d animation | Mariusbalaj | 3,014 Kb |
Octopus Bar iPad App Interactions | Davidkpiano | 6,735 Kb |
Transition | Shayhowe | 1,632 Kb |
Sequence.js - Sliding Horizontal Parallax | Maheshc | 4,537 Kb |
Pure CSS Read More Arrow | Zephyr | 1,747 Kb |
Blockquote design | Sjmcpherson | 1,863 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!