This Unity project implements an advanced Color Picker tool, allowing users to select a color using both HSV and RGB controls, as well as a hex input. Selected colors can then be applied to dynamically spawned 3D cubes in the scene.
- HSV Controls: Interactive sliders for hue, saturation, and value.
- RGB Sync: Automatically synchronized RGB sliders and input fields.
- Hex Input: Enter a hex color value to instantly update the picker.
- Live Preview: Real-time color updates displayed in an output panel and applied to cubes.
- Block Spawning: Click to place colored cubes; right-click to remove them.
- ScriptableObject Integration: Stores current color state across components using
ColorData.
- ColorPickerControll.cs – Main logic for color selection and synchronization.
- SVImageControll.cs – Handles dragging and clicking on the saturation-value square.
- CreateDestroyBox.cs – Enables spawning and deleting colored cubes with mouse input.
- ColorData.cs – ScriptableObject for storing and sharing the selected color.
- Clone the repository and open it in Unity.
- In the scene, find the Color Picker UI.
- Adjust the color using:
- Hue slider
- Saturation-Value square
- RGB sliders and inputs
- Hex code input
- Left-click in the scene to spawn cubes using the selected color.
- Right-click on existing cubes to delete them.
This project uses Unity’s built-in components and does not require external packages.
- 🔄 Change
boxScalein theCreateDestroyBoxscript to spawn bigger blocks. - 🎨 Modify
ColorDatato persist color state between sessions or scenes.

