Skip to content

Commit

Permalink
Fix Color::HSV(h,0,v)
Browse files Browse the repository at this point in the history
There was a problem when v==0
  • Loading branch information
ArthurSonzogni committed Dec 26, 2024
1 parent 43cf8e7 commit 67984b2
Showing 1 changed file with 0 additions and 4 deletions.
4 changes: 0 additions & 4 deletions src/ftxui/screen/color.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -148,10 +148,6 @@ Color Color::RGB(uint8_t red, uint8_t green, uint8_t blue) {
/// @ingroup screen
// static
Color Color::HSV(uint8_t h, uint8_t s, uint8_t v) {
if (s == 0) {
return {0, 0, 0};
}

uint8_t region = h / 43; // NOLINT
uint8_t remainder = (h - (region * 43)) * 6; // NOLINT
uint8_t p = (v * (255 - s)) >> 8; // NOLINT
Expand Down

0 comments on commit 67984b2

Please sign in to comment.