Auto-generating complementary colors
How do I make an auto-generating complementary colors?
Using javascript substring to easily generate complementary color combos.. What is a auto-generating complementary colors? How do you make a auto-generating complementary colors? This script and codes were developed by Dave DeHaan on 04 January 2023, Wednesday.
Auto-generating complementary colors - Script Codes HTML Codes
<!DOCTYPE html>
<html >
<head> <meta charset="UTF-8"> <title>Auto-generating complementary colors</title> <link rel="stylesheet" href="css/style.css">
</head>
<body> <h1>Auto-Generated Complementary Colors</h1> <script src="js/index.js"></script>
</body>
</html>
Auto-generating complementary colors - Script Codes CSS Codes
body { margin: 0px; padding: 0px; font-family: sans-serif;
}
div.holder { float: left; height: 250px; overflow: hidden; padding: 0px 25px; margin-bottom: 20px;
}
div.holder div { width: 200px; height: 75px; padding-top: 25px; border-top-left-radius: 100px; border-top-right-radius: 100px; margin-bottom: -50px; text-align: center;
}
h1 { text-align: center;
}
Auto-generating complementary colors - Script Codes JS Codes
var pad = '#000000';
for (var i = 0; i < 150; i++) { originalColor = Math.floor(Math.random()*16777215).toString(16); originalColor = pad.substring(0, pad.length - originalColor.length) + originalColor; comp1 = '#' + originalColor.substr(5,2) + originalColor.substr(1,4); comp2 = '#' + originalColor.substr(3,4) + originalColor.substr(1,2); document.write( '<div class="holder"><div style="background: '+originalColor+'; color: '+comp1+';">'+originalColor+'</div><div style="background: '+comp1+'; color: '+comp2+';">'+comp1+'</div><div style="background: '+comp2+'; color: '+originalColor+';">'+comp2+'</div></div>');
}
Developer | Dave DeHaan |
Username | davedehaan |
Uploaded | January 04, 2023 |
Rating | 3 |
Size | 1,988 Kb |
Views | 8,096 |
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 |
Asteroids | 2,846 Kb |
Spotlight Search 404 | 3,033 Kb |
Yule Logs | 1,496 Kb |
Unblur on scroll | 1,930 Kb |
Multi-color Text using globalCompositeOperation | 1,983 Kb |
HTML5 Logo Tracing | 2,301 Kb |
Dynamic Hero Image | 2,435 Kb |
A Pen by Dave DeHaan | 2,015 Kb |
Christmas Countdown | 2,133 Kb |
Tween Bubbles. | 2,175 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 |
A Pen by Bryan Rojas | Bryanrojas | 1,873 Kb |
Drag in vanilla js using dotval math instead of translate | Paulq | 2,662 Kb |
Wikipedia Viewer | Thalpha | 4,426 Kb |
A Pen by Malith Hettiarachchi | MalZiiirA | 5,531 Kb |
Base64 SVG Me | MrBambule | 44,786 Kb |
Owl Carousel - jumpTo | OwlFonk | 2,553 Kb |
A Bouncy Menu Toggle | Billyysea | 4,563 Kb |
Cars going | Netoguimaraes | 1,699 Kb |
Header | Er40 | 1,542 Kb |
Project -Show the Local Weather | Luciano_Britis | 2,583 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!