diff --git a/plugins/SimulationView/SimulationView.qml b/plugins/SimulationView/SimulationView.qml index 11b985f77c..db92fac798 100644 --- a/plugins/SimulationView/SimulationView.qml +++ b/plugins/SimulationView/SimulationView.qml @@ -485,7 +485,7 @@ Item } } - // Gradient colors for layer thickness + // Gradient colors for layer thickness (similar to parula colormap) Rectangle { // In QML 5.9 can be changed by LinearGradient // Invert values because then the bar is rotated 90 degrees id: thicknessGradient @@ -499,23 +499,23 @@ Item gradient: Gradient { GradientStop { position: 0.000 - color: Qt.rgba(1, 0, 0, 1) + color: Qt.rgba(1, 1, 0, 1) } GradientStop { position: 0.25 - color: Qt.rgba(0.5, 0.5, 0, 1) + color: Qt.rgba(1, 0.75, 0.25, 1) } GradientStop { position: 0.5 - color: Qt.rgba(0, 1, 0, 1) + color: Qt.rgba(0, 0.75, 0.5, 1) } GradientStop { position: 0.75 - color: Qt.rgba(0, 0.5, 0.5, 1) + color: Qt.rgba(0, 0.375, 0.75, 1) } GradientStop { position: 1.0 - color: Qt.rgba(0, 0, 1, 1) + color: Qt.rgba(0, 0, 0.5, 1) } } } diff --git a/plugins/SimulationView/layers3d.shader b/plugins/SimulationView/layers3d.shader index 95dc604389..03e279e9eb 100644 --- a/plugins/SimulationView/layers3d.shader +++ b/plugins/SimulationView/layers3d.shader @@ -54,9 +54,13 @@ vertex41core = vec4 layerThicknessGradientColor(float abs_value, float min_value, float max_value) { float value = (abs_value - min_value)/(max_value - min_value); - float red = max(2*value-1, 0); - float green = 1-abs(1-2*value); - float blue = max(1-2*value, 0); + float red = min(max(4*value-2, 0), 1); + float green = min(1.5*value, 0.75); + if (value > 0.75) + { + green = value; + } + float blue = 0.75-abs(0.25-value); return vec4(red, green, blue, 1.0); }