UI Themes: Grid color affecting axis color #73390

Open
opened 2020-01-25 16:29:28 +01:00 by Gilberto Rodrigues · 24 comments
Contributor

Blender Version
2.81a, 2.82 Beta.

Description
In 3D View, the grid color overlays the XYZ axis colors, so it's impossible to set the colors I want to the XYZ axis.
This even happens if the grid color is set to transparent.

0020-1556.mp4

Exact steps for others to reproduce the error

  • Go to preferences -> Themes -> User Interface -> Axis & Gizmo Colors
  • Change X and Y axis color to black RGB(0, 0, 0)
  • Go to preferences -> Themes -> 3d View
  • change Grid color/alpha.

X and Y axis color will be affected

**Blender Version** 2.81a, 2.82 Beta. **Description** In 3D View, the grid color overlays the XYZ axis colors, so it's impossible to set the colors I want to the XYZ axis. This even happens if the grid color is set to transparent. [0020-1556.mp4](https://archive.blender.org/developer/F8512321/0020-1556.mp4) **Exact steps for others to reproduce the error** - Go to preferences -> Themes -> User Interface -> Axis & Gizmo Colors - Change X and Y axis color to black RGB(0, 0, 0) - Go to preferences -> Themes -> 3d View - change Grid color/alpha. X and Y axis color will be affected
Author
Contributor

Added subscriber: @Gilberto.R

Added subscriber: @Gilberto.R

#88672 was marked as duplicate of this issue

#88672 was marked as duplicate of this issue
Member

Added subscriber: @ankitm

Added subscriber: @ankitm
Member

Find the settings to change axis and gizmo colors in Preferences → Themes → User interface → Axis and Gizmo Colours.

Screenshot 2020-01-25 at 21.47.37.png

Find the settings to change axis and gizmo colors in Preferences → Themes → User interface → Axis and Gizmo Colours. ![Screenshot 2020-01-25 at 21.47.37.png](https://archive.blender.org/developer/F8301414/Screenshot_2020-01-25_at_21.47.37.png)
Author
Contributor

Ankit, I know how to choose the axis color. The problem is that the color we pick for the Axis is then mixed with the grid color in the viewport. So the axis colors are brighter or darker depending on the grid color, and always less saturated. For example, if you need to set X axis to be the color red (R 255 G 0 B 0) the viewport will show a different less saturated red because it is mixing it with the grid color, so if I change the grid color to match the desired red for the axis, the other 2 axis colors will be screwed up. The grid is influencing XYZ colors even if the grid is fully transparent. The XYZ axis colors should be totally independent from the grid color.

Ankit, I know how to choose the axis color. The problem is that the color we pick for the Axis is then mixed with the grid color in the viewport. So the axis colors are brighter or darker depending on the grid color, and always less saturated. For example, if you need to set X axis to be the color red (R 255 G 0 B 0) the viewport will show a different less saturated red because it is mixing it with the grid color, so if I change the grid color to match the desired red for the axis, the other 2 axis colors will be screwed up. The grid is influencing XYZ colors even if the grid is fully transparent. The XYZ axis colors should be totally independent from the grid color.

Added subscriber: @Russ1642

Added subscriber: @Russ1642

I can confirm this. For an easy to see example set the x-axis to red (1 0 0) and the grid to blue (0 0 1). The x-axis will show as a magenta line.
Incorrect Axis Colours.png

I can confirm this. For an easy to see example set the x-axis to red (1 0 0) and the grid to blue (0 0 1). The x-axis will show as a magenta line. ![Incorrect Axis Colours.png](https://archive.blender.org/developer/F8301525/Incorrect_Axis_Colours.png)
Member

It was not clear to me by the original task description. I suggest you edit it.
Also, not that I know the code, but the axes are grid first, and then three special lines were taken to be given a different color. So linkage between grid and axis settings could be there.

It was not clear to me by the original task description. I suggest you edit it. Also, not that I know the code, but the axes are grid first, and then three special lines were taken to be given a different color. So linkage between grid and axis settings could be there.

Even setting the grid colour (RGBA) to 0,0,0,0 will only get you close to the axis colour. I can't get a pure red axis to show up on screen. Perhaps there's some other colour management stuff going on there.

Even setting the grid colour (RGBA) to 0,0,0,0 will only get you close to the axis colour. I can't get a pure red axis to show up on screen. Perhaps there's some other colour management stuff going on there.
Richard Antalik changed title from 3d viewport XYZ axis colors are incorrect. to UI Themes: Grid color affecting axis color 2020-01-25 20:18:29 +01:00

Changed status from 'Needs Triage' to: 'Confirmed'

Changed status from 'Needs Triage' to: 'Confirmed'
Member

Added subscribers: @Jeroen-Bakker, @JulianEisel

Added subscribers: @Jeroen-Bakker, @JulianEisel
Member

I've recently checked on this briefly to see where the issue is coming from, but I didn't see anything suspicious. My first guess was that the grid overlaps the axes, so that you'd get the color mixed. But even disabling the grid didn't seem to fix this.

@Jeroen-Bakker, could you have a look at this?

I've recently checked on this briefly to see where the issue is coming from, but I didn't see anything suspicious. My first guess was that the grid overlaps the axes, so that you'd get the color mixed. But even disabling the grid didn't seem to fix this. @Jeroen-Bakker, could you have a look at this?
Member

Classifying this as bug for now, because the code doesn't seem to do this intentionally from what I can see. The viewport team can re-classify if they disagree.

Classifying this as bug for now, because the code doesn't seem to do this intentionally from what I can see. The viewport team can re-classify if they disagree.

Added subscribers: @WilliamReynish, @fclem

Added subscribers: @WilliamReynish, @fclem

This seems to be on purpose. draw_common.c : l.173 :

  /* Grid Axis */
  UI_GetThemeColorBlendShade4fv(TH_GRID, TH_AXIS_X, 0.5f, -10, gb->colorGridAxisX);
  UI_GetThemeColorBlendShade4fv(TH_GRID, TH_AXIS_Y, 0.5f, -10, gb->colorGridAxisY);
  UI_GetThemeColorBlendShade4fv(TH_GRID, TH_AXIS_Z, 0.5f, -10, gb->colorGridAxisZ);

To me this is to avoid too much contrast in the grid but this could be a theme setting. I don't remember if there was any discussion about this.
CC: @WilliamReynish

This seems to be on purpose. `draw_common.c : l.173` : ``` /* Grid Axis */ UI_GetThemeColorBlendShade4fv(TH_GRID, TH_AXIS_X, 0.5f, -10, gb->colorGridAxisX); UI_GetThemeColorBlendShade4fv(TH_GRID, TH_AXIS_Y, 0.5f, -10, gb->colorGridAxisY); UI_GetThemeColorBlendShade4fv(TH_GRID, TH_AXIS_Z, 0.5f, -10, gb->colorGridAxisZ); ``` To me this is to avoid too much contrast in the grid but this could be a theme setting. I don't remember if there was any discussion about this. CC: @WilliamReynish
Author
Contributor

This comment was removed by @Gilberto.R

*This comment was removed by @Gilberto.R*
Author
Contributor

@WilliamReynish What's your say?

@WilliamReynish What's your say?

I agree this seems like a bug - at the very least it’s quite unexpected.

I agree this seems like a bug - at the very least it’s quite unexpected.
Member

Added subscriber: @Harley

Added subscriber: @Harley
Member

There might be some "gotchas" in fixing this.

We can easily make it so the axes are drawn with in the exact theme colors chosen:

  /* Grid Axis */
  UI_GetThemeColor4fv(TH_AXIS_X, gb->colorGridAxisX);
  UI_GetThemeColor4fv(TH_AXIS_Y, gb->colorGridAxisY);
  UI_GetThemeColor4fv(TH_AXIS_Z, gb->colorGridAxisZ);

Then set the default colors to how they visually work out to now:
AxesColors.png

At that point the default lines look as they do now, but you can set them to anything you like and you see exactly that.

However, the Navigate gizmo balls look washed out since they share the same colors. We are used to those nav balls looking more saturated than the axes lines:

NavigateGizmo.png

There might be some "gotchas" in fixing this. We can easily make it so the axes are drawn with in the exact theme colors chosen: ``` /* Grid Axis */ UI_GetThemeColor4fv(TH_AXIS_X, gb->colorGridAxisX); UI_GetThemeColor4fv(TH_AXIS_Y, gb->colorGridAxisY); UI_GetThemeColor4fv(TH_AXIS_Z, gb->colorGridAxisZ); ``` Then set the default colors to how they visually work out to now: ![AxesColors.png](https://archive.blender.org/developer/F8512674/AxesColors.png) At that point the default lines look as they do now, but you can set them to anything you like and you see exactly that. However, the Navigate gizmo balls look washed out since they share the same colors. We are used to those nav balls looking more saturated than the axes lines: ![NavigateGizmo.png](https://archive.blender.org/developer/F8512680/NavigateGizmo.png)
Author
Contributor

Then there needs to be an option to select the axis colors for the gizmo separately.

Then there needs to be an option to select the axis colors for the gizmo separately.
Member

Added subscribers: @xXAndreaXx, @PratikPB2123

Added subscribers: @xXAndreaXx, @PratikPB2123

Yeah i already reported the bug almost two months ago

Yeah i already reported the bug almost two months ago

Added subscriber: @ArmoredWolf

Added subscriber: @ArmoredWolf
Philipp Oeser removed the
Interest
User Interface
label 2023-02-10 09:24:51 +01:00
Sign in to join this conversation.
No Label
Interest
Alembic
Interest
Animation & Rigging
Interest
Asset Browser
Interest
Asset Browser Project Overview
Interest
Audio
Interest
Automated Testing
Interest
Blender Asset Bundle
Interest
BlendFile
Interest
Collada
Interest
Compatibility
Interest
Compositing
Interest
Core
Interest
Cycles
Interest
Dependency Graph
Interest
Development Management
Interest
EEVEE
Interest
EEVEE & Viewport
Interest
Freestyle
Interest
Geometry Nodes
Interest
Grease Pencil
Interest
ID Management
Interest
Images & Movies
Interest
Import Export
Interest
Line Art
Interest
Masking
Interest
Metal
Interest
Modeling
Interest
Modifiers
Interest
Motion Tracking
Interest
Nodes & Physics
Interest
OpenGL
Interest
Overlay
Interest
Overrides
Interest
Performance
Interest
Physics
Interest
Pipeline, Assets & IO
Interest
Platforms, Builds & Tests
Interest
Python API
Interest
Render & Cycles
Interest
Render Pipeline
Interest
Sculpt, Paint & Texture
Interest
Text Editor
Interest
Translations
Interest
Triaging
Interest
Undo
Interest
USD
Interest
User Interface
Interest
UV Editing
Interest
VFX & Video
Interest
Video Sequencer
Interest
Virtual Reality
Interest
Vulkan
Interest
Wayland
Interest
Workbench
Interest: X11
Legacy
Blender 2.8 Project
Legacy
Milestone 1: Basic, Local Asset Browser
Legacy
OpenGL Error
Meta
Good First Issue
Meta
Papercut
Meta
Retrospective
Meta
Security
Module
Animation & Rigging
Module
Core
Module
Development Management
Module
EEVEE & Viewport
Module
Grease Pencil
Module
Modeling
Module
Nodes & Physics
Module
Pipeline, Assets & IO
Module
Platforms, Builds & Tests
Module
Python API
Module
Render & Cycles
Module
Sculpt, Paint & Texture
Module
Triaging
Module
User Interface
Module
VFX & Video
Platform
FreeBSD
Platform
Linux
Platform
macOS
Platform
Windows
Priority
High
Priority
Low
Priority
Normal
Priority
Unbreak Now!
Status
Archived
Status
Confirmed
Status
Duplicate
Status
Needs Info from Developers
Status
Needs Information from User
Status
Needs Triage
Status
Resolved
Type
Bug
Type
Design
Type
Known Issue
Type
Patch
Type
Report
Type
To Do
No Milestone
No project
No Assignees
12 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: blender/blender#73390
No description provided.