Giter Site home page Giter Site logo

americanamanada / hexadecimal-color-generator Goto Github PK

View Code? Open in Web Editor NEW

This project forked from marceloadan73/hexadecimal-color-generator

0.0 0.0 0.0 289 KB

Application to generate hexadecimal colors

Home Page: https://marceloadan73.github.io/Hexadecimal-Color-Generator/

JavaScript 26.27% CSS 56.89% HTML 16.84%

hexadecimal-color-generator's Introduction

This code is a small application that generates a color palette in hexadecimal format.

imagen del proyecto

First define a container in the HTML with the id palleteContainer where the colors will be displayed, then also uses an input of type range with id colorRange to adjust the number of dynamically generated colors. With an array called colorValues that contains the necessary digits and letters, generates colors in hexadecimal format, set the pallet size to PALLETE_SIZE, which in this case is 5. The createPallete() function creates the palette. Clears the container, then creates divs for each color and adds them to the container. the colorize(element) function is responsible for assigning a random color to each element in the palette. Generates a random color in hexadecimal format and applies it as the background of the element, and also displays the hexadecimal code inside the element. The updatePallete() function updates all colors in the palette by calling colorize() for each element in the container, finally, createPallete() is called to generate the palette when the page loads.

๐Ÿ”— See in operation

hexadecimal-color-generator's People

Contributors

marceloadan73 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.