Unity Color Picker is a Visual Studio Code extension that provides an interactive color picker for various color formats used in Unity projects. It enhances your coding workflow by offering intuitive color previews and easy editing capabilities directly within your code editor.
- 
Multiple Color Formats: - Unity Color: new Color(r, g, b, a)(Alpha values are optional)
- Unity Color32: new Color32(r, g, b, a)(with values ranging from 0 to 255)
- Preset Colors: Color.red,Color.green,Color.blue, etc.
 
- Unity Color: 
- 
Inline Color Decorations: Displays color swatches next to color definitions in your code. 
- 
Native Color Picker Integration: Click on a swatch to open VSCode’s built-in color picker for easy color adjustments. 
- 
Optional Background Color: Adds a background color decoration behind detected colors, configurable via settings. 
- 
Open a Supported File: Open any C# file ( .cs) containing Unity color definitions.using UnityEngine; public class TestColor { void Start() { // Using new Color constructor Color myColor = new Color(0.3f, 0.3f, 0.3f, 1f); // Using Color32 constructor Color32 myColor32 = new Color32(76, 153, 0, 255); // Using preset color Color presetColor = Color.red; } } 
- 
View Color Decorations: The extension automatically detects color values and displays a color swatch beside each color definition. 
- 
Edit Colors: - Using Native Picker: Click on the color swatch to open VSCode’s native color picker. Adjust the color as desired, and the color value in your code will update in real-time.
 
You can toggle the background color decoration using the following setting:
- Setting Name: unityColorPicker.showBackgroundColor
- Default: false
- 
Open Settings: - Press Ctrl+,(Windows/Linux) orCmd+,(macOS).
- Or, go to File > Preferences > Settings.
 
- Press 
- 
Search for unityColorPicker.showBackgroundColor.
- 
Toggle the Setting: - Set to trueto enable background color decorations.
- Set to falseto disable background color decorations.
 
- Set to 
{
  "unityColorPicker.showBackgroundColor": true
}This project is licensed under the MIT License.
This extension will not be actively improved or updated with new features unless it breaks due to changes in VSCode or Unity. If you would like to see new features or improvements, I highly encourage you to fork the repository and make changes as needed. You can find the repository on my GitHub profile.
For support, please open an issue on the GitHub repository.
