GithubHelp home page GithubHelp logo

background-generator's Introduction

Colour Randomizer

Setup

  • Fork this repository by clicking the "Fork" button in the top-right corner
  • Clone the new repository to your local machine using git clone {url}

Steps

  1. Complete the steps in the HTML document to build a prototype interface for the colour-randomizer
  2. Built a colour string using getRandomColorChannel() for each of the three colour channels (R, G, B)
  3. Update user interface (document), setting the new colour to the body's background
  4. Use the new RGB value to update the label "rgb(###, ####, ###)" (replacing ###s with the Number values)
  5. Wrap the random colour procedure in a function named setNewColour(), call it from the console to test

Example

example colour generator

Tips

  • Before starting, consider using the browser's developer tools to prototype a solution manually
    • Start by changing the <body> background from the "Elements" tab by changing the style="" attribute
  • Next, consider prototyping within JS by assigning three variables, each with a different Number value: 0-255
    • This will assist by creating a controlled case before assigning a random value
  • Use the console to test each line of code that affects the document, as you code
    • Mis-selecting elements will create errors that prevent the page from working as intended

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.