Skip to content

Commit

Permalink
slight change to color parameters
Browse files Browse the repository at this point in the history
added more white, changed function return value of fully random palette function
  • Loading branch information
DedeHai committed Feb 1, 2024
1 parent ca05aa8 commit e0f89be
Showing 1 changed file with 6 additions and 8 deletions.
14 changes: 6 additions & 8 deletions wled00/colors.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,7 @@ CRGBPalette16 generateHarmonicRandomPalette(CRGBPalette16 &basepalette)
palettecolors[i].value = random8(220,255);
}
//allow one to be lower
palettecolors[3].saturation = random8(80,255);
palettecolors[3].saturation = random8(20,255);
palettecolors[3].value = random8(80,255);


Expand Down Expand Up @@ -198,13 +198,11 @@ CRGBPalette16 generateHarmonicRandomPalette(CRGBPalette16 &basepalette)

CRGBPalette16 generateRandomPalette(void) //generate fully random palette
{
CRGBPalette16 random = CRGBPalette16(
CHSV(random8(), random8(160, 255), random8(128, 255)),
CHSV(random8(), random8(160, 255), random8(128, 255)),
CHSV(random8(), random8(160, 255), random8(128, 255)),
CHSV(random8(), random8(160, 255), random8(128, 255)));

return generateHarmonicRandomPalette(random);
return CRGBPalette16(
CHSV(random8(), random8(160, 255), random8(128, 255)),
CHSV(random8(), random8(160, 255), random8(128, 255)),
CHSV(random8(), random8(160, 255), random8(128, 255)),
CHSV(random8(), random8(160, 255), random8(128, 255)));
}

void colorHStoRGB(uint16_t hue, byte sat, byte* rgb) //hue, sat to rgb
Expand Down

0 comments on commit e0f89be

Please sign in to comment.