diff --git a/common/render_settings.cpp b/common/render_settings.cpp index 9e48d4b7cc..d00c95aa8d 100644 --- a/common/render_settings.cpp +++ b/common/render_settings.cpp @@ -57,10 +57,14 @@ void RENDER_SETTINGS::update() for( int i = 0; i < LAYER_ID_COUNT; i++ ) { m_hiContrastColor[i] = m_layerColors[i].Mix( m_layerColors[LAYER_PCB_BACKGROUND], - m_hiContrastFactor ); + m_hiContrastFactor ); + m_layerColorsHi[i] = m_layerColors[i].Brightened( m_highlightFactor ); m_layerColorsDark[i] = m_layerColors[i].Darkened( 1.0 - m_highlightFactor ); - m_layerColorsSel[i] = m_layerColors[i].Brightened( m_selectFactor ); + + // Linear brightening doesn't work well for colors near white + double factor = ( m_selectFactor * 0.6 ) + pow( m_layerColors[i].GetBrightness(), 3 ); + m_layerColorsSel[i] = m_layerColors[i].Brightened( std::min( factor, 1.0 ) ); } } diff --git a/pcbnew/pcb_painter.cpp b/pcbnew/pcb_painter.cpp index ce1075e45e..e365225613 100644 --- a/pcbnew/pcb_painter.cpp +++ b/pcbnew/pcb_painter.cpp @@ -311,9 +311,10 @@ COLOR4D PCB_RENDER_SETTINGS::GetColor( const VIEW_ITEM* aItem, int aLayer ) cons } if( netColor == COLOR4D::UNSPECIFIED ) + { netColor = color; - - if( selected ) + } + else if( selected ) { // Selection brightening overrides highlighting netColor.Brighten( m_selectFactor );