This project is a simple color converter built with Next.js. It allows users to pick a color, see its RGB and HEX values, and convert between these formats.
- Color Picker: Select a color and automatically see its RGB and HEX values.
- HEX Textbox: Enter a HEX value and see the corresponding RGB values.
- RGB Textboxes: Enter RGB values and see the corresponding HEX value.
- Live validation and conversion.
- Responsive design.
-
Clone the repository:
git clone https://github.com/CallahanVentures/Hex2RGB.git cd color-converter
-
Install dependencies:
npm install
- Run the development server
npm run dev
Open your browser and navigate to http://localhost:3000 to see the app in action.
- Color Picker: Use the color picker to select a color. The corresponding RGB and HEX values will be displayed.
- HEX Textbox: Enter a HEX value to see the corresponding RGB values. Only valid HEX values are accepted.
- RGB Textboxes: Enter RGB values to see the corresponding HEX value. Only valid RGB values are accepted.
- pages/index.tsx: The main page of the application containing the color converter components.
- scripts/color-converter.ts: Utility functions for converting between HEX and RGB values.
- styles/globals.css: Global styles for the application.
- Input: Used for the color picker, HEX, and RGB inputs.
- Card: A container for the main content.
- Spacer: Adds spacing between elements.
- Link: A navigation link to Callahan Ventures.
- Hex2RGB: Converts a HEX value to an RGB object.
- RGB2Hex: Converts RGB values to a HEX string.