用户登录
用户注册

分享至

HTML5 Canvas 颜色选择器

  • 作者: 叫我官人c丶
  • 来源: 51数据库
  • 2022-09-22
<!DOCTYPE html>
<html lang="en" >
    <head>
        <meta charset="utf-8" />
        <title>HTML5 canvas - Image color picker | Script Tutorials</title>
        <link href="css/main.css" rel="stylesheet" type="text/css" />
        <script type="text/javascript" src="js/jquery-1.5.2.min.js"></script>
        <script type="text/javascript" src="js/script.js"></script>
    </head>
    <body>
        <div >
            <div >
                <canvas id="panel" width="500" height="333"></canvas>
            </div>
            <div >
                <div><input type="button" value="Next image" id="swImage" /></div>
                <div>Preview:</div>
                <div id="preview"></div>
                <div>Color:</div>
                <div>R: <input type="text" id="rVal" /></div>
                <div>G: <input type="text" id="gVal" /></div>
                <div>B: <input type="text" id="bVal" /></div>
                <div>RGB: <input type="text" id="rgbVal" /></div>
                <div>RGBA: <input type="text" id="rgbaVal" /></div>
                <div>HEX: <input type="text" id="hexVal" /></div>
                <hr />
            </div>
            <div ></div>
        </div>
        <footer>
            <h2>HTML5 canvas - Image color picker</h2>
            <a href="http://www.script-tutorials.com/html5-canvas-image-color-picker/" >Back to original tutorial on <span>Script Tutorials</span></a>
        </footer>
    </body>
</html>
软件
前端设计
程序设计
Java相关