Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/judah4/HSV-Color-Picker-Unity
HSV color picker for Unity UI
https://github.com/judah4/HSV-Color-Picker-Unity
color-picker hacktoberfest hacktoberfest2020 ui unity unity-ui unity3d
Last synced: 3 months ago
JSON representation
HSV color picker for Unity UI
- Host: GitHub
- URL: https://github.com/judah4/HSV-Color-Picker-Unity
- Owner: judah4
- License: mit
- Created: 2014-09-09T18:19:55.000Z (over 10 years ago)
- Default Branch: master
- Last Pushed: 2023-03-05T20:25:37.000Z (almost 2 years ago)
- Last Synced: 2024-08-02T05:11:53.357Z (6 months ago)
- Topics: color-picker, hacktoberfest, hacktoberfest2020, ui, unity, unity-ui, unity3d
- Language: ShaderLab
- Homepage:
- Size: 2.12 MB
- Stars: 624
- Watchers: 33
- Forks: 103
- Open Issues: 5
-
Metadata Files:
- Readme: README.md
- Funding: .github/FUNDING.yml
- License: LICENSE
Awesome Lists containing this project
- awesome-unity-open-source-on-github - HSV-Color-Picker-Unity - HSV color picker (Color Picker)
README
HSV Color Picker
======================[![openupm](https://img.shields.io/npm/v/com.judahperez.hsvcolorpicker?label=openupm®istry_uri=https://package.openupm.com)](https://openupm.com/packages/com.judahperez.hsvcolorpicker/)
HSV color picker using Unity UI. [Unity Forum Thread](https://forum.unity.com/threads/color-picker.267043/)
## Versions
Unity 2020.3 LTS## Install
### UPM
Follow the instructions on OpenUpm
https://openupm.com/packages/com.judahperez.hsvcolorpicker/
```json
{
"scopedRegistries": [
{
"name": "package.openupm.com",
"url": "https://package.openupm.com",
"scopes": []
}
],
"dependencies": {
"com.judahperez.hsvcolorpicker": "3.3.0"
}
}
```### Unity Package
![alt tag](https://i.imgur.com/Fn2T6Nu.png)
Should be really easy to use. Just add the prefab to the canvas, hook up an event, and it's good to go.
```csharpusing HSVPicker;
using UnityEngine;public class SomeClass : MonoBehavior
{public Renderer renderer;
public ColorPicker picker;
// Use this for initialization
void Start ()
{
picker.onValueChanged.AddListener(color =>
{
renderer.material.color = color;
});
renderer.material.color = picker.CurrentColor;
}
// Update is called once per frame
void Update () {
}
...```
if you want to assign your own color first, just do this call and it sets the slider and picker to the proper selection.
```csharp
Color color = Color.green;
picker.CurrentColor = color;
```![resizable panels](https://raw.githubusercontent.com/judah4/HSV-Color-Picker-Unity/master/Docs/MoreFeatures.PNG)
Can be toggled and sized as needed in settings.
# Setup Settings
![settings inspector](https://raw.githubusercontent.com/judah4/HSV-Color-Picker-Unity/master/Docs/SetupSettings.PNG)
On the color picker setup section.
Show Rgb: Show RGB sliders.
Show Hsv: Show HSV sliders.
Show Alpha: Show the alpha slider.
Show Color Box: Show the larger color selection box and color column.
Show Color Slider Toggle: Show the button to toggle the HSV and RGB sliders.
Show Header: Options to show the top header with color preview and hex code.
* Hide: Hide the top header.
* Show Color: Show only the color preview in the header.
* Show Color Code: Show only the color code in the header.
* Show All: Show the entire top header.## Color Presets
The prefabs starts with 4 colors in the color presets. This can be updated in the Setup section of the picker prefab.
Set the Preset Colors Id for different shared list between color pickers.