diff --git a/assets/index-38wlkhQq.css b/assets/index-BQ-rnwJd.css similarity index 53% rename from assets/index-38wlkhQq.css rename to assets/index-BQ-rnwJd.css index 7563bec..2c7fb5e 100644 --- a/assets/index-38wlkhQq.css +++ b/assets/index-BQ-rnwJd.css @@ -1 +1 @@ -:root{font-family:Inter,system-ui,Avenir,Helvetica,Arial,sans-serif;line-height:1.5;font-weight:400;color-scheme:light dark;color:#ffffffde;background-color:#242424;font-synthesis:none;text-rendering:optimizeLegibility;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}a{font-weight:500;color:#646cff;text-decoration:inherit}a:hover{color:#535bf2}body{margin:0;display:flex;place-items:center;min-width:320px;min-height:100vh}h1{font-size:3.2em;line-height:1.1}#app{max-width:1280px;margin:0 auto;padding:2rem;text-align:center;padding-left:300px}.logo{height:6em;padding:1.5em;will-change:filter;transition:filter .3s}.logo:hover{filter:drop-shadow(0 0 2em #646cffaa)}.logo.vanilla:hover{filter:drop-shadow(0 0 2em #f7df1eaa)}.card{padding:2em}.read-the-docs{color:#888}button{border-radius:8px;border:1px solid transparent;padding:.6em 1.2em;font-size:1em;font-weight:500;font-family:inherit;background-color:#1a1a1a;cursor:pointer;transition:border-color .25s}button:hover{border-color:#646cff}button:focus,button:focus-visible{outline:4px auto -webkit-focus-ring-color}@media (prefers-color-scheme: light){:root{color:#213547;background-color:#fff}a:hover{color:#747bff}button{background-color:#f9f9f9}}.controls{position:fixed;top:20px;left:20px;background:#000000b3;padding:20px;border-radius:10px;color:#fff;min-width:250px}.control-section{margin-bottom:20px}.control-section h3{margin:0 0 10px;font-size:1.1em;border-bottom:1px solid rgba(255,255,255,.3);padding-bottom:5px}.slider-group{margin-bottom:10px}.slider-group label{display:block;margin-bottom:5px;font-size:.9em}input[type=range]{width:100%;margin:0}#current-color{margin:10px auto;border-radius:5px}.hsv-view{margin-top:20px;display:flex;flex-direction:column;gap:10px;align-items:center}#hsv-cone{background-color:#1a1a1a;border-radius:50%}#hue-slider{border-radius:5px}.canvas-container{display:flex;gap:20px;justify-content:center}#rgb-canvas-container,#hsv-canvas-container{width:400px;height:400px} +:root{font-family:Inter,system-ui,Avenir,Helvetica,Arial,sans-serif;line-height:1.5;font-weight:400;color-scheme:light dark;color:#ffffffde;background-color:#242424;font-synthesis:none;text-rendering:optimizeLegibility;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}a{font-weight:500;color:#646cff;text-decoration:inherit}a:hover{color:#535bf2}body{margin:0;display:flex;place-items:center;min-width:320px;min-height:100vh}h1{font-size:3.2em;line-height:1.1}#app{max-width:1280px;margin:0 auto;padding:2rem;text-align:center;padding-left:250px}.logo{height:6em;padding:1.5em;will-change:filter;transition:filter .3s}.logo:hover{filter:drop-shadow(0 0 2em #646cffaa)}.logo.vanilla:hover{filter:drop-shadow(0 0 2em #f7df1eaa)}.card{padding:2em}.read-the-docs{color:#888}button{border-radius:8px;border:1px solid transparent;padding:.6em 1.2em;font-size:1em;font-weight:500;font-family:inherit;background-color:#1a1a1a;cursor:pointer;transition:border-color .25s}button:hover{border-color:#646cff}button:focus,button:focus-visible{outline:4px auto -webkit-focus-ring-color}@media (prefers-color-scheme: light){:root{color:#213547;background-color:#fff}a:hover{color:#747bff}button{background-color:#f9f9f9}}.controls{position:fixed;top:20px;left:20px;background:#000000b3;padding:15px;border-radius:10px;color:#fff;min-width:200px}.control-section{margin-bottom:20px}.control-section h3{margin:0 0 8px;font-size:1em;border-bottom:1px solid rgba(255,255,255,.3);padding-bottom:4px}.slider-group{margin-bottom:8px}.slider-group label{display:block;margin-bottom:5px;font-size:.9em}input[type=range]{width:100%;margin:0}#current-color{width:80px!important;height:80px!important;margin:10px auto;border-radius:5px}.hsv-view{margin-top:20px;display:flex;flex-direction:column;gap:10px;align-items:center}#hsv-cone{background-color:#1a1a1a;border-radius:50%}#hue-slider{border-radius:5px}.canvas-container{display:flex;gap:20px;justify-content:center}#rgb-canvas-container,#hsv-canvas-container{width:400px;height:400px}.color-display-container{display:flex;flex-direction:column;align-items:center;gap:10px}#copy-color-btn{padding:8px 16px;background-color:#4caf50;color:#fff;border:none;border-radius:4px;cursor:pointer}#copy-color-btn:hover{background-color:#45a049} diff --git a/assets/index-B5iRNuYq.js b/assets/index-CAP67pqv.js similarity index 99% rename from assets/index-B5iRNuYq.js rename to assets/index-CAP67pqv.js index ed1b0f1..5d5e336 100644 --- a/assets/index-B5iRNuYq.js +++ b/assets/index-CAP67pqv.js @@ -3878,7 +3878,10 @@ void main() { -
+
+
+ +
- `,document.getElementById("rgb-canvas-container").appendChild(this.rgbRenderer.domElement),document.getElementById("hsv-canvas-container").appendChild(this.hsvRenderer.domElement)}setupEventListeners(){const t=document.getElementById("r-slider"),e=document.getElementById("g-slider"),n=document.getElementById("b-slider"),r=()=>{const c=t.value/255,u=e.value/255,d=n.value/255;document.getElementById("r-value").textContent=Math.round(c*255),document.getElementById("g-value").textContent=Math.round(u*255),document.getElementById("b-value").textContent=Math.round(d*255),this.rgbCube.updateMarkerPosition(c,u,d);const[f,m,_]=Uo(c*255,u*255,d*255);this.updateHSVSliders(f,m,_);const x=new Dt(c,u,d);this.hsvCone.updateMarkerPosition(f,m,_,x),this.updateColorDisplay(c,u,d)};t.addEventListener("input",r),e.addEventListener("input",r),n.addEventListener("input",r);const s=document.getElementById("h-slider"),a=document.getElementById("s-slider"),o=document.getElementById("v-slider"),l=()=>{const c=parseFloat(s.value),u=parseFloat(a.value),d=parseFloat(o.value);document.getElementById("h-value").textContent=Math.round(c),document.getElementById("s-value").textContent=Math.round(u),document.getElementById("v-value").textContent=Math.round(d);const[f,m,_]=ta(c,u,d);this.updateRGBSliders(f,m,_),this.rgbCube.updateMarkerPosition(f,m,_);const x=new Dt(f,m,_);this.hsvCone.updateMarkerPosition(c,u,d,x),this.updateColorDisplay(f,m,_)};s.addEventListener("input",l),a.addEventListener("input",l),o.addEventListener("input",l)}updateRGBSliders(t,e,n){document.getElementById("r-slider").value=t*255,document.getElementById("g-slider").value=e*255,document.getElementById("b-slider").value=n*255,document.getElementById("r-value").textContent=Math.round(t*255),document.getElementById("g-value").textContent=Math.round(e*255),document.getElementById("b-value").textContent=Math.round(n*255)}updateHSVSliders(t,e,n){document.getElementById("h-slider").value=t,document.getElementById("s-slider").value=e,document.getElementById("v-slider").value=n,document.getElementById("h-value").textContent=Math.round(t),document.getElementById("s-value").textContent=Math.round(e),document.getElementById("v-value").textContent=Math.round(n)}updateColorDisplay(t,e,n){const r=document.getElementById("current-color");r.style.backgroundColor=`rgb(${Math.round(t*255)}, ${Math.round(e*255)}, ${Math.round(n*255)})`,r.style.width="100px",r.style.height="100px"}animate(){requestAnimationFrame(()=>this.animate()),this.rgbControls.update(),this.hsvControls.update(),this.rgbRenderer.render(this.rgbScene,this.rgbCamera),this.hsvRenderer.render(this.hsvScene,this.hsvCamera)}}new om; + `,document.getElementById("rgb-canvas-container").appendChild(this.rgbRenderer.domElement),document.getElementById("hsv-canvas-container").appendChild(this.hsvRenderer.domElement)}setupEventListeners(){const t=document.getElementById("r-slider"),e=document.getElementById("g-slider"),n=document.getElementById("b-slider"),r=()=>{const c=t.value/255,u=e.value/255,d=n.value/255;document.getElementById("r-value").textContent=Math.round(c*255),document.getElementById("g-value").textContent=Math.round(u*255),document.getElementById("b-value").textContent=Math.round(d*255),this.rgbCube.updateMarkerPosition(c,u,d);const[f,m,_]=Uo(c*255,u*255,d*255);this.updateHSVSliders(f,m,_);const x=new Dt(c,u,d);this.hsvCone.updateMarkerPosition(f,m,_,x),this.updateColorDisplay(c,u,d)};t.addEventListener("input",r),e.addEventListener("input",r),n.addEventListener("input",r);const s=document.getElementById("h-slider"),a=document.getElementById("s-slider"),o=document.getElementById("v-slider"),l=()=>{const c=parseFloat(s.value),u=parseFloat(a.value),d=parseFloat(o.value);document.getElementById("h-value").textContent=Math.round(c),document.getElementById("s-value").textContent=Math.round(u),document.getElementById("v-value").textContent=Math.round(d);const[f,m,_]=ta(c,u,d);this.updateRGBSliders(f,m,_),this.rgbCube.updateMarkerPosition(f,m,_);const x=new Dt(f,m,_);this.hsvCone.updateMarkerPosition(c,u,d,x),this.updateColorDisplay(f,m,_)};s.addEventListener("input",l),a.addEventListener("input",l),o.addEventListener("input",l)}updateRGBSliders(t,e,n){document.getElementById("r-slider").value=t*255,document.getElementById("g-slider").value=e*255,document.getElementById("b-slider").value=n*255,document.getElementById("r-value").textContent=Math.round(t*255),document.getElementById("g-value").textContent=Math.round(e*255),document.getElementById("b-value").textContent=Math.round(n*255)}updateHSVSliders(t,e,n){document.getElementById("h-slider").value=t,document.getElementById("s-slider").value=e,document.getElementById("v-slider").value=n,document.getElementById("h-value").textContent=Math.round(t),document.getElementById("s-value").textContent=Math.round(e),document.getElementById("v-value").textContent=Math.round(n)}updateColorDisplay(t,e,n){const r=document.getElementById("current-color"),s=`rgb(${Math.round(t*255)}, ${Math.round(e*255)}, ${Math.round(n*255)})`;r.style.backgroundColor=s,r.style.width="100px",r.style.height="100px",document.getElementById("copy-color-btn").addEventListener("click",()=>{navigator.clipboard.writeText(s).then(()=>{alert("色コードをクリップボードにコピーしました!")}).catch(a=>{console.error("クリップボードへのコピーに失敗しました:",a),alert("コピーに失敗しました。")})})}animate(){requestAnimationFrame(()=>this.animate()),this.rgbControls.update(),this.hsvControls.update(),this.rgbRenderer.render(this.rgbScene,this.rgbCamera),this.hsvRenderer.render(this.hsvScene,this.hsvCamera)}}new om; diff --git a/index.html b/index.html index 1b9e89d..227daae 100644 --- a/index.html +++ b/index.html @@ -5,8 +5,8 @@ Vite App - - + +