s2
This commit is contained in:
@@ -1,26 +1,25 @@
|
||||
<div style="padding-bottom: 350px;">
|
||||
<div class="container-dzx">
|
||||
<h1>RGB to HEX Converter</h1>
|
||||
<label for="red">Red:</label><br>
|
||||
<input type="number" id="red" min="0" max="255" required>
|
||||
<br>
|
||||
<label for="green">Green:</label><br>
|
||||
<input type="number" id="green" min="0" max="255" required>
|
||||
<br>
|
||||
<label for="blue">Blue:</label><br>
|
||||
<input type="number" id="blue" min="0" max="255" required>
|
||||
<br>
|
||||
<button class="button-style" onclick="convert()">Convert</button>
|
||||
<div style="display: flex; flex-direction: row; justify-content: center; align-items: center; place-items: center;">
|
||||
<div id="result"></div>
|
||||
<div>
|
||||
<button id="copyButton" style="display: none; padding: 5px 10px 5px 10px; background-color: #7d7d7d; border-radius: 5px;" onclick="copyToClipboard()">Copy</button>
|
||||
</div>
|
||||
<section class="diZContainer diZmxAuto diZmt8">
|
||||
<h1 class="diZBorderBottom">RGB to HEX Converter</h1>
|
||||
<div class="diZmxAuto toolsSection diZMaxW600 diZmy20" >
|
||||
<div class="diZFlexColumn"><br>
|
||||
<label for="red">Red:</label>
|
||||
<input style="width: 97%;" type="number" id="red" min="0" max="255" required>
|
||||
</div>
|
||||
<span style="display: none;" id="copied-notice"></span>
|
||||
|
||||
<div class="diZFlexColumn"><br>
|
||||
<label for="green">Green:</label>
|
||||
<input style="width: 97%;" type="number" id="green" min="0" max="255" required>
|
||||
</div>
|
||||
<div class="diZFlexColumn"><br>
|
||||
<label for="blue">Blue:</label>
|
||||
<input style="width: 97%;" type="number" id="blue" min="0" max="255" required>
|
||||
</div>
|
||||
<div id="result"></div>
|
||||
<button class="" onclick="convert()">Convert</button>
|
||||
<button id="copyButton" onclick="copyToClipboard()">Copy</button>
|
||||
<span class="diZDisplayNone" id="copied-notice"></span>
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
<!-- diZJustifyCenter diZItemsCenter -->
|
||||
<script>
|
||||
function rgbToHex(r, g, b) {
|
||||
r = Math.max(0, Math.min(255, r));
|
||||
|
||||
Reference in New Issue
Block a user