Core: Extend Color API

* Fix issues with alpha value <> transparency
* Use type traits to convert between different color classes (fixes #14515)
This commit is contained in:
wmayer
2024-08-21 22:26:46 +02:00
committed by Chris Hennes
parent e5c3d25316
commit 3c1bf8e864
12 changed files with 494 additions and 50 deletions

View File

@@ -363,7 +363,7 @@ void ViewProviderMeshCurvature::setVertexCurvatureMode(int mode)
for (auto const& value : fValues | boost::adaptors::indexed(0)) {
App::Color c = pcColorBar->getColor(value.value());
diffcol[value.index()].setValue(c.r, c.g, c.b);
transp[value.index()] = c.a;
transp[value.index()] = c.transparency();
}
pcColorMat->diffuseColor.finishEditing();