+ JavaScript の質問用スレッド vol.57 +at HP
+ JavaScript の質問用スレッド vol.57 + - 暇つぶし2ch213:Name_Not_Found
07/06/21 09:28:59
function pick(x, y) {
var t=Math.atan2(y-250,x-250), l=Math.sqrt((y-250)*(y-250)+(x-250)*(x-250));
l = (Math.max(Math.min(l, 250), 50) - 50) / 200; t = (t/(Math.PI*2)+1)%1;
var rgb = hsb2rgb(t, 1, l), elt = document.getElementById('h1');
elt.innerHTML = rgb; elt.style.backgroundColor = rgb;
}
</script>
</head><body onload="init()">
<h1 id="h1" style="position:absolute; top:520px">Color Picker</h1>
</body></html>


次ページ
続きを表示
1を表示
最新レス表示
レスジャンプ
類似スレ一覧
スレッドの検索
話題のニュース
おまかせリスト
オプション
しおりを挟む
スレッドに書込
スレッドの一覧
暇つぶし2ch