| 49 | } |
| 50 | |
| 51 | CHSV noiseRingHSV8(float angle, u32 time, float radius) { |
| 52 | fl::HSV16 hsv16 = noiseRingHSV16(angle, time, radius); |
| 53 | |
| 54 | // Scale 16-bit components down to 8-bit using bit shift with rounding |
| 55 | // This preserves the relative position in the value range |
| 56 | u8 h = (hsv16.h + 128) >> 8; |
| 57 | u8 s = (hsv16.s + 128) >> 8; |
| 58 | u8 v = (hsv16.v + 128) >> 8; |
| 59 | |
| 60 | return CHSV(h, s, v); |
| 61 | } |
| 62 | |
| 63 | CRGB noiseRingCRGB(float angle, u32 time, float radius) { |
| 64 | // Convert angle to cartesian coordinates |
no test coverage detected