77 lines
4.4 KiB
HTML
77 lines
4.4 KiB
HTML
<!DOCTYPE html>
|
|
<html lang="en">
|
|
<head>
|
|
<meta charset="UTF-8">
|
|
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
|
<title>Wow, so many pwetty colours owo</title>
|
|
<link rel="stylesheet" href="https://cdn.simplecss.org/simple.min.css">
|
|
<link rel="stylesheet" href="./css/custom.css">
|
|
<script src="https://kit.fontawesome.com/14a35c233c.js" crossorigin="anonymous"></script>
|
|
</head>
|
|
<body>
|
|
<svg style="width:0;height:0;position:absolute;" aria-hidden="true" focusable="false">
|
|
<linearGradient id="logo-gradient" x2="1" y2="1">
|
|
<stop offset="0%" stop-color="#f5a9b8" />
|
|
<stop offset="30%" stop-color="#f5a9b8" />
|
|
<stop offset="100%" stop-color="#5bcffa" />
|
|
</linearGradient>
|
|
</svg>
|
|
<div class="popup" id="popup"> Copied color: <span id="popupText"></span> </div>
|
|
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512" class="logo" fill="url(#logo-gradient) #ffffff"><!--!Font Awesome Free 6.7.2 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license/free Copyright 2025 Fonticons, Inc.--><path d="M512 256c0 .9 0 1.8 0 2.7c-.4 36.5-33.6 61.3-70.1 61.3L344 320c-26.5 0-48 21.5-48 48c0 3.4 .4 6.7 1 9.9c2.1 10.2 6.5 20 10.8 29.9c6.1 13.8 12.1 27.5 12.1 42c0 31.8-21.6 60.7-53.4 62c-3.5 .1-7 .2-10.6 .2C114.6 512 0 397.4 0 256S114.6 0 256 0S512 114.6 512 256zM128 288a32 32 0 1 0 -64 0 32 32 0 1 0 64 0zm0-96a32 32 0 1 0 0-64 32 32 0 1 0 0 64zM288 96a32 32 0 1 0 -64 0 32 32 0 1 0 64 0zm96 96a32 32 0 1 0 0-64 32 32 0 1 0 0 64z"/></svg>
|
|
<p>These are the colours <a href="https://samalyx.gay" target="_blank">I</a> use!</p>
|
|
<h2 style="color: #F5A9B8">Definitely some Colours</h2>
|
|
<div class="palette">
|
|
<div class="color light" style="background-color: #f5a9b8;">#F5A9B8</div>
|
|
<div class="color light" style="background-color: #5bcffa;">#5BCFFA</div>
|
|
<div class="color light" style="background-color: #FFFFFF;">#FFFFFF</div>
|
|
<div class="color" style="background-color: #161618;">#161618</div>
|
|
</div>
|
|
|
|
<h2 class="jax">Jax P. Nolan <a href="https://ref.jaxoff.tv" target="_blank"><i class="fas fa-link fa-2xs"></i></a></h2>
|
|
<div class="palette">
|
|
<div class="color light" style="background-color: #A8C5DB;">Skin<br>#A8C5DB</div>
|
|
<div class="color light" style="background-color: #F5A9B8;">Dyed Hair<br>#F5A9B8</div>
|
|
<div class="color" style="background-color: #12354B;">Natural Hair<br>#12354B</div>
|
|
<div class="color" style="background-color: #105522;">Eyes<br>#105522</div>
|
|
<div class="color" style="background-color: #12404B;">Freckles<br>#12404B</div>
|
|
</div>
|
|
|
|
<h2 class="aidan">Aidan Leahy <!--<a href="https://dalfuss.net/OCs/aidan" target="_blank"><i class="fas fa-link fa-2xs"></i></a>--></h2>
|
|
<div class="palette">
|
|
<div class="color light" style="background-color: #93ABBE;">Skin<br>#93ABBE</div>
|
|
<div class="color" style="background-color: #216240;">Hair<br>#216240</div>
|
|
<div class="color" style="background-color: #2BA2E6;">Eyes<br>#2BA2E6</div>
|
|
</div>
|
|
|
|
<script>
|
|
const colors = document.querySelectorAll(".color");
|
|
const popup = document.getElementById("popup");
|
|
const popupText = document.getElementById("popupText");
|
|
|
|
function rgbToHex(rgb) {
|
|
const result = rgb.match(/^rgb\((\d+), (\d+), (\d+)\)$/);
|
|
if (result) {
|
|
const r = parseInt(result[1]).toString(16).padStart(2, '0');
|
|
const g = parseInt(result[2]).toString(16).padStart(2, '0');
|
|
const b = parseInt(result[3]).toString(16).padStart(2, '0');
|
|
return `#${r}${g}${b}`;
|
|
}
|
|
return rgb; // Falls kein gültiger RGB-Wert gefunden wurde
|
|
}
|
|
|
|
colors.forEach(color => {
|
|
color.addEventListener("click", () => {
|
|
const colorValue = color.style.backgroundColor;
|
|
const hexColor = rgbToHex(colorValue); // Umwandlung in Hex-Code
|
|
navigator.clipboard.writeText(hexColor); // Hex-Code in die Zwischenablage kopieren
|
|
popupText.innerText = hexColor; // Anzeige des Hex-Codes im Popup
|
|
popup.style.display = "block";
|
|
setTimeout(() => {
|
|
popup.style.display = "none";
|
|
}, 2000);
|
|
});
|
|
});
|
|
</script>
|
|
|
|
</body>
|
|
</html> |