Coder Social home page Coder Social logo

puddy's Introduction

puddy is a system for organizing, converting and displaying color palettes using rgb, hsb (hsv), and hex. first, import current palettes to your database with import, then view your collection with index.html

create an import.txt and put the palette name on the first line put the color type on the second line: rgb, hsb or hex below that list the comma separated values in brackets, one per line or, if hex, list the strings in quotes, one per line

example import.txt below:

coolPalette
rgb
[255,0,0]
[0,255,0]
[0,0,255]
...

another example import.txt below:

coolPalette
hex
'#ff0000'
'#00ff00'
'#0000ff'
...

once you have pasted all the colors you want to save into import.txt, use the following command in the terminal:

$ node import.mjs

this should prompt you for the location of your allP.json (the database of all your palettes).

the idea is that, whichever of the 3 color types you are importing, the import script will add that palette to the database object in allP.json, and also automatically convert the colors to the other 2 types and add those to the database object, too.

once finished importing, you can open index.html with Live Server vscode extension, or your web server of choice. it should load index.js and show grids and names for all your palettes, to browse.

obviously a million and one features need to be added. even what i've outlined above isn't 100% finished, but this is my plan for how to organise the app.

the syntax of the database JSON file (allP.json) is:

{
"duskTillDawn": {
    "description": "Dusk Till Dawn",
    "rgb": [
      [25, 27, 13],
      ...
    ],
    "hsb": [
      [69, 52, 11],
      ...
    ],
    "hex": [
      "#191b0d",
      ...
    ]
  },
"eyeWideShut": {
    "description": "Eyes Wide Shut",
    "rgb": [
      [33, 24, 70],
      ...
    ],
    "hsb": [
      [252, 66, 27],
      ...
    ],
    "hex": [
      "#211846",
      ...
    ]
  }
}

puddy's People

Contributors

jussamouse avatar

Watchers

 avatar

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.