- Upload images.
- Toggle color dropper mode by clicking on the dropper icon.
- Display magnified view and hex code of the color under the cursor.
- Select and display the color details by clicking on the canvas.
-
Clone the repository:
git clone https://github.com/yourusername/color-picker.git cd color-dropper
-
Install dependencies:
npm install
-
Compile TypeScript to JavaScript:
npm run build
-
Start the local server:
npm start
- Open your web browser and navigate to
http://localhost:3000
. - Click on the "Select Image" button to upload an image.
- Click on Dropper icon
- Hover over the canvas to see the color details in the magnifier circle.
- Click on the canvas to set selected color
index.html
: The HTML file that contains the structure of the application.src/index.ts
: The TypeScript file that contains the main logic of the application.src/index.js
: The compiled JavaScript file.style.css
: The CSS file that contains the styles for the application.
To continuously compile TypeScript during development, run:
npx tsc --watch