Skip to content

Commit

Permalink
Change some colours of new scheme
Browse files Browse the repository at this point in the history
- Axes colour swap for colourblind friendliness
- Internal infill pink to move closer to stock prusaslicer colours
- Support material colours changed because they do not look different enough when viewed with colour blindness (according to photoshop).
  • Loading branch information
n8bot committed Dec 4, 2021
1 parent 4eca3af commit 0cffc7a
Show file tree
Hide file tree
Showing 4 changed files with 18 additions and 9 deletions.
5 changes: 3 additions & 2 deletions src/slic3r/GUI/3DBed.cpp
Expand Up @@ -128,8 +128,9 @@ void Bed3D::Axes::render() const
const_cast<GLModel*>(&m_arrow)->set_color(-1, { 0.278f, 0.886f, 0.435f, 1.0f });
render_axis(Geometry::assemble_transform(m_origin, { -0.5 * M_PI, 0.0, 0.0 }).cast<float>());

// z axis: categorical 11
const_cast<GLModel*>(&m_arrow)->set_color(-1, { 0.098f, 0.753f, 0.780f, 1.0f });
// z axis: option 1: categorical 11 option 2: categorical 3
//const_cast<GLModel*>(&m_arrow)->set_color(-1, { 0.098f, 0.753f, 0.780f, 1.0f }); // categorical 11 Option 1
const_cast<GLModel*>(&m_arrow)->set_color(-1, { 0.153f, 0.502f, 0.922f, 1.0f }); // categorical 3 Option 2
render_axis(Geometry::assemble_transform(m_origin).cast<float>());

shader->stop_using();
Expand Down
16 changes: 11 additions & 5 deletions src/slic3r/GUI/GCodeViewer.cpp
Expand Up @@ -481,16 +481,22 @@ const std::vector<GCodeViewer::Color> GCodeViewer::Extrusion_Role_Colors {{
{ 0.875f, 0.749f, 0.098f, 1.0f }, // erPerimeter: categorical 1
{ 0.910f, 0.529f, 0.102f, 1.0f }, // erExternalPerimeter: categorical 2
{ 0.153f, 0.502f, 0.922f, 1.0f }, // erOverhangPerimeter: categorical 3
{ 0.435f, 0.220f, 0.694f, 1.0f }, // erInternalInfill: categorical 4
{ 0.318f, 0.267f, 0.827f, 1.0f }, // erSolidInfill: categorical 5
//{ 0.435f, 0.220f, 0.694f, 1.0f }, // erInternalInfill: categorical 4 Option 1
{ 0.855f, 0.204f, 0.565f, 1.0f }, // erInternalInfill: categorical 8 Option 2
//{ 0.318f, 0.267f, 0.827f, 1.0f }, // erSolidInfill: categorical 5 Option 1
{ 0.435f, 0.220f, 0.694f, 1.0f }, // erSolidInfill: categorical 4 Option 2
{ 0.796f, 0.435f, 0.063f, 1.0f }, // erTopSolidInfill: categorical 6
{ 0.910f, 0.529f, 0.102f, 1.0f }, // erIroning: erExternalPerimeter: categorical 2
{ 0.565f, 0.537f, 0.980f, 1.0f }, // erBridgeInfill: categorical 7
{ 0.980f, 0.980f, 0.980f, 1.0f }, // erGapFill: 98% white (max color brightness)
{ 0.855f, 0.204f, 0.565f, 1.0f }, // erSkirt: categorical 8
{ 0.608f, 0.925f, 0.329f, 1.0f }, // erSupportMaterial: categorical 9
//{ 0.855f, 0.204f, 0.565f, 1.0f }, // erSkirt: categorical 8 Option 1
{ 0.318f, 0.267f, 0.827f, 1.0f }, // erSkirt: categorical 5 Option 2
//{ 0.608f, 0.925f, 0.329f, 1.0f }, // erSupportMaterial: categorical 9 Option 1
{ 0.098f, 0.753f, 0.780f, 1.0f }, // erSupportMaterial: categorical 11 Option 2
{ 0.149f, 0.553f, 0.424f, 1.0f }, // erSupportMaterialInterface: categorical 10
{ 0.098f, 0.753f, 0.780f, 1.0f }, // erWipeTower: categorical 11
//{ 0.098f, 0.753f, 0.780f, 1.0f }, // erWipeTower: categorical 11 Option 1
{ 0.608f, 0.925f, 0.329f, 1.0f }, // erWipeTower: categorical 9 Option 2

{ 0.278f, 0.886f, 0.435f, 1.0f }, // erCustom: categorical 12
{ 0.098f, 0.098f, 0.098f, 1.0f } // erMixed: 9.8% black (min color brightness)
}};
Expand Down
3 changes: 2 additions & 1 deletion src/slic3r/GUI/Gizmos/GLGizmoBase.hpp
Expand Up @@ -24,7 +24,8 @@ static const std::array<float, 4> DEFAULT_HIGHLIGHT_COLOR = { 0.796f, 0.435f, 0.
static const std::array<std::array<float, 4>, 3> AXES_COLOR = {{
{ 0.855f, 0.204f, 0.565f, 1.0f }, // categorical 8
{ 0.278f, 0.886f, 0.435f, 1.0f }, // categorical 12
{ 0.098f, 0.753f, 0.780f, 1.0f } // categorical 11
//{ 0.098f, 0.753f, 0.780f, 1.0f } // categorical 11 Option 1
{ 0.153f, 0.502f, 0.922f, 1.0f } // categorical 3 Option 2
}};
static const std::array<float, 4> CONSTRAINED_COLOR = { 0.502f, 0.502f, 0.502f, 1.0f }; // 50% shade

Expand Down
3 changes: 2 additions & 1 deletion src/slic3r/GUI/Gizmos/GLGizmoHollow.cpp
Expand Up @@ -132,7 +132,8 @@ void GLGizmoHollow::render_points(const Selection& selection, bool picking) cons
}
else {
if (size_t(m_hover_id) == i) {
render_color = { 0.153f, 0.502f, 0.922f, 1.0f }; // categorical 3
//render_color = { 0.153f, 0.502f, 0.922f, 1.0f }; // categorical 3 Option 1
render_color = { 0.098f, 0.753f, 0.780f, 1.0f }; // categorical 11 Option 2
}
else if (m_c->hollowed_mesh() &&
i < m_c->hollowed_mesh()->get_drainholes().size() &&
Expand Down

0 comments on commit 0cffc7a

Please sign in to comment.