This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| /// <summary> | |
| /// Converts HSV to RGB888 using integer-only math. | |
| /// </summary> | |
| /// <param name="hue">Hue angle [0 ; UINT16_MAX], corresponds to [0 ; 360] degrees color wheel.</param> | |
| /// <param name="saturation">Saturation value [0 ; 255].</param> | |
| /// <param name="value">Brightness value [0 ; 255].</param> | |
| /// <returns>uint32 RGB888 color, where the color is represented as 0xRRGGBB.</returns> | |
| static uint32_t HsvToRgb(const uint16_t hue, const uint8_t saturation, const uint8_t value) | |
| { | |
| static constexpr uint8_t Segments = 6; |