You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

83 lines
1.6 KiB

<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>Color Converter</title>
<style>
label {
display: block;
}
#preview {
width: 100%;
height: 200px;
}
.r {
color: red;
}
.g {
color: green;
}
.b {
color: blue;
}
.html5 {
display: none;
}
</style>
</head>
<body>
<h1>Color Converter</h1>
<p>
[<a href="//xn--rck9c.xn--tckwe/en/">back</a>]
</p>
<h2>HTML-Style Hex</h2>
<input type="text" id="html-text" onchange="updateColor(this.value)">
<input type="color" id="html-color" class="html5" onchange="updateColor(this.value)">
<hr>
<h2>RGB</h2>
<div id="rgb">
<label class="r">
<input type="number" id="rgb-r" min="0" max="255" onchange="updateColor(document.getElementById('rgb'))">
Red
</label>
<label class="g">
<input type="number" id="rgb-g" min="0" max="255" onchange="updateColor(document.getElementById('rgb'))">
Green
</label>
<label class="b">
<input type="number" id="rgb-b" min="0" max="255" onchange="updateColor(document.getElementById('rgb'))">
Blue
</label>
</div>
<hr>
<h2>BGR15</h2>
<label>
<input type="text" id="bgr15-no-bit15" onchange="updateColor(this.value)">
Bit 15 not set (sometimes transparent)
</label>
<label>
<input type="text" id="bgr15-bit15" onchange="updateColor(this.value)">
Bit 15 set
</label>
<hr>
<h2>Preview</h2>
<div id="preview"></div>
<script src="/assets/js/color.js"></script>
</body>
</html>