Giter VIP home page Giter VIP logo

color-picker's Introduction

color-picker

This project is a demo for smart lighting.
can support edit area and channels for running on browsers of window.

examples

Dev

http://localhost:8000/color/{area}?r={r}&g={g}&b={b}

  • area: lighting area id, required
  • r: r channel of rgb, no required, default: 1
  • g: g channel of rgb, no required, default: 2
  • b: b channel of rgb, no required, default: 3

http://localhost:8000/temperature/{area}?w={w}&c={c}

  • area: lighting area id, required
  • w: w is warn color channel of temperature, no required, default: 1
  • c: c is cool color channel of temperature, no required, default: 2

http://localhost:8000/brightness/{area}?b={b}

  • area: lighting area id, required
  • b: b is brightness channel, no required, default: 1

Product

http://localhost:8000/color.html?area={area}?r={r}&g={g}&b={b}

  • area: lighting area id, required
  • r: r channel of rgb, no required, default: 1
  • g: g channel of rgb, no required, default: 2
  • b: b channel of rgb, no required, default: 3

http://localhost:8000/temperature.html?area={area}?w={w}&c={c}

  • area: lighting area id, required
  • w: w is warn color channel of temperature, no required, default: 1
  • c: c is cool color channel of temperature, no required, default: 2

http://localhost:8000/brightness.html?area={area}?b={b}

  • area: lighting area id, required
  • b: b is brightness channel, no required, default: 1

Debugger

在query中添加debugger=true参数实现debugger,可以查看相应的值,以及转化后的值。 eg: http://localhost:8000/color.html?debugger=true

using on windows

Temperature:

 http://localhost:8000/temperature.html
 or
 http://localhost:8000/temperature

Color:

 http://localhost:8000/color.html
 or
 http://localhost:8000/color

Brightness:

http://localhost:8000/brightness.html
or
http://localhost:8000/brightness

if view the value, entry ?debugger=true to url

Scene control for config

http://localhost:8000/scene.html
or
http://localhost:8000/scene 

config.json

Direction: /data/config.json

All data of this json are required.

  • area: lighting area id.
  • bChannel: brightness channel id.
  • tChannel: temperature cool channel id.
  • wChannel: temperature warn channel id.
  • scene: a array for all scene. every scene is a object, key is display name, value is scene value that is only.
  • colorChannel: color channel

Notes: All of the above URL can use .html or do not use .html

color-picker's People

Contributors

xuqiang1227 avatar

Stargazers

slm avatar  avatar  avatar

Watchers

James Cloos avatar  avatar

Forkers

xiaobei1990

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.