RGB to HEX Converter

Convert between RGB and HEX color codes.

How to use RGB to HEX Converter?

  1. Enter values.
  2. See results instantly.

Your privacy matters: All processing happens locally on your computer. We never see your data.

`; const hInput = document.getElementById('hash-input'); hInput.oninput = () => { const v = hInput.value; if(!v) return; document.getElementById('md5-out').textContent = CryptoJS.MD5(v).toString(); document.getElementById('sha1-out').textContent = CryptoJS.SHA1(v).toString(); document.getElementById('sha256-out').textContent = CryptoJS.SHA256(v).toString(); }; } else if (toolId === 'morse-code') { const map = { 'A': '.-', 'B': '-...', 'C': '-.-.', 'D': '-..', 'E': '.', 'F': '..-.', 'G': '--.', 'H': '....', 'I': '..', 'J': '.---', 'K': '-.-', 'L': '.-..', 'M': '--', 'N': '-.', 'O': '---', 'P': '.--.', 'Q': '--.-', 'R': '.-.', 'S': '...', 'T': '-', 'U': '..-', 'V': '...-', 'W': '.--', 'X': '-..-', 'Y': '-.--', 'Z': '--..', '1': '.----', '2': '..---', '3': '...--', '4': '....-', '5': '.....', '6': '-....', '7': '--...', '8': '---..', '9': '----.', '0': '-----', ' ': '/' }; const reverseMap = Object.entries(map).reduce((acc, [k, v]) => ({ ...acc, [v]: k }), {}); container.innerHTML = `
`; const mInput = document.getElementById('morse-input'); document.getElementById('to-morse').onclick = () => { mInput.value = mInput.value.toUpperCase().split('').map(c => map[c] || c).join(' '); }; document.getElementById('from-morse').onclick = () => { mInput.value = mInput.value.split(' ').map(c => reverseMap[c] || c).join(''); }; }