Unity Products:Amplify Shader Editor/RGB to HSV
RGB to HSV Node
The RGB to HSV node converts a value from a RGB to an HSV color space. RGB color space is defined by three separate channels:
- R: First channel defines the amount of red in the color
- G: Second channel defines the amount of green in the color
- B: Third channel defines the amount of blue in the color
As for the HSV color space, it represents color in a cylinder and also contains three separate channels but each one as a completely different meaning
- Hue: First channel defines the color itself as an angle on a color cylinder
- Saturation: Second channel defines amount of gray in the color as a distance across a color cylinder radius
- Value: Third channel defines brightness/intensity of the color as a distance across a color cylinder height
Nodes used:
Texture Sample,
RGB to HSV
Node Parameter | Description | Default Value |
---|---|---|
RGB | Color vector in the RGB color space.
Only visible if the respective input port is not connected. |
0,0,0 |
Precision | Defines the amount of bytes the variable can hold, effectively defining how precise the value is. It's usefulness is bond by the hardware specifications necessary. Lowest precision is slightly faster but might produce errors and artifacts.
|
Float |
Input Port | Description | Type |
---|---|---|
RGB | Color vector in the RGB color space.
|
Float3 |
Output Port | Description | Type |
---|---|---|
HSV | Returns the converted value in HSV color space. | Float3 |
Hue | Returns only the Hue component of the converted value in HSV color space. | Float |
Saturation | Returns only the Saturation component of the converted value in HSV color space. | Float |
Value | Returns only the Value/Brightness component of the converted value in HSV color space. | Float |