GithubHelp home page GithubHelp logo

color-picker's People

Contributors

dependabot[bot] avatar masakudamatsu avatar mkudamatsu avatar

Watchers

 avatar  avatar

color-picker's Issues

User input for hues

Show color name and swash.
User can select one by click/tap

For each hue, three versions

  • In hexagon divided into 3 triangles?

Red 350, 0, 10
Orange/brown 20, 30, 40
Yellow 60
Yellow-green 90
Green 120
Green-cyan 150
Cyan / Aqua / Teal 180
Blue-cyan 210
Blue 240
Indigo(?) 270
Violet / Purple / Magenta 300
Shocking pink 320, 330, 340

Each swash is bordered with black/white if user selected luminance is lighter/darker than mid-grey.

Background is the user selected luminance in grayscale.

Use the range input to set the luminance level

See my Evernote note: HTML forms 207: Range Input (Slider).

It's more illustrative if we change the luminance level continuously, rather than entering a value in a discrete fashion.

Render a swash of red shade given the luminance level #3

Set the red luminance level 0.9.

  • This is an attribute value for Swash component

Then calculate the RGB values for a given luminance level that the user enters.

  • LuminanceSetter component executes the setLuminance() method in App.js with the user-entered value as its argument.
  • App.js then updates the luminance level as its state, and pass it to the Swash component.
  • Swash component calls the generateColor() function from ColorGenerator.js, to calculate the RGB values as an object.

Use this RGB value to render a swash of red shades.

  • Swash component updates the text and the background-color property based on the calculated RGB value.
  • If there's no corresponding color for a given luminance level, set background-color: transparent with no text.

User input fields for luminance

luminance (1 to 21)
hex
rgb
hsl

Either text field

  • User can copy-and-paste the color code
    Or number boxes
  • User doesn’t need to type “hsl” or “,” or “#”

Render user selected luminance

To feedback the user action consequence.

Make the entire page background rendered in user’s choice.

  • Text color will be switched to black/whiteif luminance is higher/lower than the mid-grey (4.58 luminance)

Render six hue shades

For each hue (red, yellow, green, cyan, blue, purple):

  • In ColorGenerator.js, create a function that produces RGB values from the luminance level
  • In Swash component, use the conditional flow to switch the ColorGenerator method to obtain RGB values
  • In App.js, add the Swash component instances with each hue's luminance as an attribute.

Convert HSLuv outputs into hex/rgb/hsl

To render color swashes with color code values

Background color is black/white if the user selected luminance is brighter/darker than mid-grey.

  • This ensures 4.5:1 contrast ratio

Decide which SQL to be used

https://www.codecademy.com/paths/create-a-back-end-app-with-javascript/tracks/back-end-development-capstones/modules/bapi-capstones-solution-code-and-next-steps/informationals/back-end-web-development-next-steps

  • SQLite is a very quick and easy way to set up a database, but because the database lives in a single file, it is not always supported in cloud hosting.
  • There are many other database types such as PostgreSQL (https://www.postgresql.org/) and MySQL (https://www.mysql.com/) which have Node.js clients and can be used in deployed applications.
  • These are just different dialects of SQL, and the syntax of PostgreSQL and MySQL is extremely similar to what you already know.

Design concept

Keywords

  • Three (color code values. Hue variations for each color name, number of primary colors)
  • Light (luminance comes from the amount of light)

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.