Skip to content
This repository has been archived by the owner on Sep 19, 2023. It is now read-only.
/ color_app Public archive

A react app that generates an 256 x 128 image where each pixel has a unique color.

Notifications You must be signed in to change notification settings

scourgetheone/color_app

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

This project was bootstrapped with Create React App.

Introduction

This is an application that generates a 256 x 128 image where each pixel is a discrete color. This is done as a solution to a coding exercise.

Overview and Instructions

First, after cloning the repo, run yarn install or npm install to install the dependencies.

yarn install

Then, while still in the project directory, you can run:

yarn start

Runs the app in the development mode.
Open http://localhost:3000 to view it in the browser.

The page will reload if you make edits.
You will also see any lint errors in the console.


The image is generated once when the page loads.

You can check from the console some logs of the generation process. The app generates 32768 colors using the Colors.generateColors() function, which then is used in App.generateImage() when mapping the pixels to a sine function.

For debugging, the interface lets you inspect each pixel in the generated image by simply hovering your mouse over the image, or by filling in the x,y coordinates in the form given and then pressing the "Get color of pixel" button.

alt text

About

A react app that generates an 256 x 128 image where each pixel has a unique color.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published