Skip to content

Commit

Permalink
Fix index
Browse files Browse the repository at this point in the history
  • Loading branch information
IhateTrains committed Sep 17, 2024
1 parent a97a757 commit 0b30a0e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion Color.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -291,7 +291,7 @@ commonItems::Color commonItems::Color::Factory::getColor(std::istream& theStream
if (rgb.size() == 3)
{
// This is not HSV, this is RGB doubles. Just convert to ints to get normal RGB.
if (rgb[0] > 1 || rgb[1] > 1 || rgb[3] > 1)
if (rgb[0] > 1 || rgb[1] > 1 || rgb[2] > 1)
return Color(std::array{static_cast<int>(std::round(rgb[0])), static_cast<int>(std::round(rgb[1])), static_cast<int>(std::round(rgb[2]))});

// If all RGB values are in the range 0-1, multiply by 255 and round to get normal RGB.
Expand Down

0 comments on commit 0b30a0e

Please sign in to comment.