diff --git a/ogre2/src/Ogre2SegmentationMaterialSwitcher.cc b/ogre2/src/Ogre2SegmentationMaterialSwitcher.cc index b96fbaf45..d189d20af 100644 --- a/ogre2/src/Ogre2SegmentationMaterialSwitcher.cc +++ b/ogre2/src/Ogre2SegmentationMaterialSwitcher.cc @@ -187,9 +187,9 @@ math::Color Ogre2SegmentationMaterialSwitcher::LabelToColor(int64_t _label, int b = distribution(this->generator); math::Color color( - static_cast(r), - static_cast(g), - static_cast(b)); + static_cast(r / 255.0f), + static_cast(g / 255.0f), + static_cast(b / 255.0f)); // if the label is colored before return the color // don't check for taken colors in that case, all items