KiCad PCB EDA Suite
KIGFX::COLOR4D Class Reference

Class COLOR4D is the color representation with 4 components: red, green, blue, alpha. More...

#include <color4d.h>

Public Member Functions

 COLOR4D ()
 
 COLOR4D (double aRed, double aGreen, double aBlue, double aAlpha)
 Constructor. More...
 
 COLOR4D (EDA_COLOR_T aColor)
 Constructor. More...
 
COLOR4DBrighten (double aFactor)
 Function Brighten Makes the color brighter by a given factor. More...
 
COLOR4DDarken (double aFactor)
 Function Darken Makes the color darker by a given factor. More...
 
COLOR4DInvert ()
 Function Invert Makes the color inverted, alpha remains the same. More...
 
COLOR4DSaturate (double aFactor)
 Saturates the color to a given factor (in HSV model) More...
 
COLOR4D Brightened (double aFactor) const
 Function Brightened Returns a color that is brighter by a given factor, without modifying object. More...
 
COLOR4D Darkened (double aFactor) const
 Function Darkened Returns a color that is darker by a given factor, without modifying object. More...
 
COLOR4D WithAlpha (double aAlpha) const
 Function WithAlpha Returns a colour with the same colour, but the given alpha. More...
 
COLOR4D Inverted () const
 Function Inverted Returns an inverted color, alpha remains the same. More...
 
double GetBrightness () const
 Function GetBrightness Returns the brightness value of the color ranged from 0.0 to 1.0. More...
 
void ToHSV (double &aOutHue, double &aOutSaturation, double &aOutValue, bool aAlwaysDefineHue=false) const
 Function ToHSV() Converts current color (stored in RGB) to HSV format. More...
 
void FromHSV (double aInH, double aInS, double aInV)
 Function FromHSV() Changes currently used color to the one given by hue, saturation and value parameters. More...
 

Public Attributes

double r
 Red component. More...
 
double g
 Green component. More...
 
double b
 Blue component. More...
 
double a
 Alpha component. More...
 

Static Public Attributes

static const COLOR4D UNSPECIFIED
 For legacy support; used as a value to indicate color hasn't been set yet. More...
 
static const COLOR4D WHITE
 
static const COLOR4D BLACK
 

Detailed Description

Class COLOR4D is the color representation with 4 components: red, green, blue, alpha.

Definition at line 39 of file color4d.h.

Constructor & Destructor Documentation

KIGFX::COLOR4D::COLOR4D ( )
inline

Definition at line 43 of file color4d.h.

Referenced by Brightened(), COLOR4D(), Darkened(), Inverted(), and WithAlpha().

43  :
44  r( 0 ), g( 0 ), b( 0 ), a( 1.0 )
45  {
46  }
double g
Green component.
Definition: color4d.h:288
double b
Blue component.
Definition: color4d.h:289
double a
Alpha component.
Definition: color4d.h:290
double r
Red component.
Definition: color4d.h:287
KIGFX::COLOR4D::COLOR4D ( double  aRed,
double  aGreen,
double  aBlue,
double  aAlpha 
)
inline

Constructor.

Parameters
aRedis the red component [0.0 .. 1.0].
aGreenis the green component [0.0 .. 1.0].
aBlueis the blue component [0.0 .. 1.0].
aAlphais the alpha value [0.0 .. 1.0].

Definition at line 56 of file color4d.h.

References a, b, COLOR4D(), g, and r.

56  :
57  r( aRed ), g( aGreen ), b( aBlue ), a( aAlpha )
58  {
59  assert( r >= 0.0 && r <= 1.0 );
60  assert( g >= 0.0 && g <= 1.0 );
61  assert( b >= 0.0 && b <= 1.0 );
62  assert( a >= 0.0 && a <= 1.0 );
63  }
double g
Green component.
Definition: color4d.h:288
double b
Blue component.
Definition: color4d.h:289
double a
Alpha component.
Definition: color4d.h:290
double r
Red component.
Definition: color4d.h:287
COLOR4D::COLOR4D ( EDA_COLOR_T  aColor)

Constructor.

Parameters
aColoris one of KiCad's palette colors.
See also
EDA_COLOR_T

Definition at line 32 of file color4d.cpp.

References a, b, BLACK, COLOR4D(), ColorFindNearest(), g, g_ColorRefs, StructColors::m_Blue, StructColors::m_Green, StructColors::m_LightColor, StructColors::m_Red, NBCOLORS, NextColor(), r, ToHSV(), and UNSPECIFIED.

33 {
34  if( aColor <= UNSPECIFIED_COLOR || aColor >= NBCOLORS )
35  {
36  *this = COLOR4D::UNSPECIFIED;
37  return;
38  }
39 
40  r = g_ColorRefs[aColor].m_Red / 255.0;
41  g = g_ColorRefs[aColor].m_Green / 255.0;
42  b = g_ColorRefs[aColor].m_Blue / 255.0;
43  a = 1.0;
44 }
unsigned char m_Red
Definition: colors.h:146
unsigned char m_Green
Definition: colors.h:145
double g
Green component.
Definition: color4d.h:288
static const COLOR4D UNSPECIFIED
For legacy support; used as a value to indicate color hasn&#39;t been set yet.
Definition: color4d.h:293
double b
Blue component.
Definition: color4d.h:289
double a
Alpha component.
Definition: color4d.h:290
unsigned char m_Blue
Definition: colors.h:144
const StructColors g_ColorRefs[NBCOLORS]
The predefined colors used in KiCad.
Definition: colors.cpp:37
double r
Red component.
Definition: color4d.h:287
Number of colors.
Definition: colors.h:75

Member Function Documentation

COLOR4D& KIGFX::COLOR4D::Brighten ( double  aFactor)
inline

Function Brighten Makes the color brighter by a given factor.

Parameters
aFactorSpecifies how bright the color should become (valid values: 0.0 .. 1.0).
Returns
COLOR4D& Brightened color.

Definition at line 148 of file color4d.h.

References b, g, and r.

149  {
150  assert( aFactor >= 0.0 && aFactor <= 1.0 );
151 
152  r = r * ( 1.0 - aFactor ) + aFactor;
153  g = g * ( 1.0 - aFactor ) + aFactor;
154  b = b * ( 1.0 - aFactor ) + aFactor;
155 
156  return *this;
157  }
double g
Green component.
Definition: color4d.h:288
double b
Blue component.
Definition: color4d.h:289
double r
Red component.
Definition: color4d.h:287
COLOR4D KIGFX::COLOR4D::Brightened ( double  aFactor) const
inline

Function Brightened Returns a color that is brighter by a given factor, without modifying object.

Parameters
aFactorSpecifies how bright the color should become (valid values: 0.0 .. 1.0).
Returns
COLOR4D Highlighted color.

Definition at line 201 of file color4d.h.

References a, b, COLOR4D(), g, and r.

Referenced by KIGFX::GERBVIEW_RENDER_SETTINGS::ImportLegacyColors(), KIGFX::selectedBrightening(), and KIGFX::RENDER_SETTINGS::update().

202  {
203  assert( aFactor >= 0.0 && aFactor <= 1.0 );
204 
205  return COLOR4D( r * ( 1.0 - aFactor ) + aFactor,
206  g * ( 1.0 - aFactor ) + aFactor,
207  b * ( 1.0 - aFactor ) + aFactor,
208  a );
209  }
double g
Green component.
Definition: color4d.h:288
double b
Blue component.
Definition: color4d.h:289
double a
Alpha component.
Definition: color4d.h:290
double r
Red component.
Definition: color4d.h:287
COLOR4D& KIGFX::COLOR4D::Darken ( double  aFactor)
inline

Function Darken Makes the color darker by a given factor.

Parameters
aFactorSpecifies how dark the color should become (valid values: 0.0 .. 1.0).
Returns
COLOR4D& Darkened color.

Definition at line 165 of file color4d.h.

References b, g, and r.

Referenced by SetLayerColor().

166  {
167  assert( aFactor >= 0.0 && aFactor <= 1.0 );
168 
169  r = r * ( 1.0 - aFactor );
170  g = g * ( 1.0 - aFactor );
171  b = b * ( 1.0 - aFactor );
172 
173  return *this;
174  }
double g
Green component.
Definition: color4d.h:288
double b
Blue component.
Definition: color4d.h:289
double r
Red component.
Definition: color4d.h:287
COLOR4D KIGFX::COLOR4D::Darkened ( double  aFactor) const
inline

Function Darkened Returns a color that is darker by a given factor, without modifying object.

Parameters
aFactorSpecifies how dark the color should become (valid values: 0.0 .. 1.0).
Returns
COLOR4D Darkened color.

Definition at line 217 of file color4d.h.

References a, b, COLOR4D(), g, and r.

Referenced by KIGFX::GERBVIEW_RENDER_SETTINGS::ImportLegacyColors(), and KIGFX::RENDER_SETTINGS::update().

218  {
219  assert( aFactor >= 0.0 && aFactor <= 1.0 );
220 
221  return COLOR4D( r * ( 1.0 - aFactor ),
222  g * ( 1.0 - aFactor ),
223  b * ( 1.0 - aFactor ),
224  a );
225  }
double g
Green component.
Definition: color4d.h:288
double b
Blue component.
Definition: color4d.h:289
double a
Alpha component.
Definition: color4d.h:290
double r
Red component.
Definition: color4d.h:287
void COLOR4D::FromHSV ( double  aInH,
double  aInS,
double  aInV 
)

Function FromHSV() Changes currently used color to the one given by hue, saturation and value parameters.

Parameters
aInHis hue component, in degrees.
aInSis saturation component.
aInVis value component.

Definition at line 339 of file color4d.cpp.

References b, g, i, and r.

Referenced by DIALOG_COLOR_PICKER::createHSVBitmap(), GetBrightness(), DIALOG_COLOR_PICKER::OnChangeBrightness(), DIALOG_COLOR_PICKER::OnChangeEditHue(), DIALOG_COLOR_PICKER::OnChangeEditSat(), Saturate(), and DIALOG_COLOR_PICKER::setHSvaluesFromCursor().

340 {
341  if( aInS <= 0.0 )
342  {
343  r = aInV;
344  g = aInV;
345  b = aInV;
346  return;
347  }
348 
349  double hh = aInH;
350 
351  while( hh >= 360.0 )
352  hh -= 360.0;
353 
354  /* Hue in degrees (0...360) is coded according to this table
355  * 0 or 360 : red
356  * 60 : yellow
357  * 120 : green
358  * 180 : cyan
359  * 240 : blue
360  * 300 : magenta
361  */
362  hh /= 60.0;
363 
364  int i = (int) hh;
365  double ff = hh - i;
366 
367  double p = aInV * ( 1.0 - aInS );
368  double q = aInV * ( 1.0 - ( aInS * ff ) );
369  double t = aInV * ( 1.0 - ( aInS * ( 1.0 - ff ) ) );
370 
371  switch( i )
372  {
373  case 0:
374  r = aInV;
375  g = t;
376  b = p;
377  break;
378 
379  case 1:
380  r = q;
381  g = aInV;
382  b = p;
383  break;
384 
385  case 2:
386  r = p;
387  g = aInV;
388  b = t;
389  break;
390 
391  case 3:
392  r = p;
393  g = q;
394  b = aInV;
395  break;
396 
397  case 4:
398  r = t;
399  g = p;
400  b = aInV;
401  break;
402 
403  case 5:
404  default:
405  r = aInV;
406  g = p;
407  b = q;
408  break;
409  }
410 }
double g
Green component.
Definition: color4d.h:288
double b
Blue component.
Definition: color4d.h:289
size_t i
Definition: json11.cpp:597
double r
Red component.
Definition: color4d.h:287
double KIGFX::COLOR4D::GetBrightness ( ) const
inline

Function GetBrightness Returns the brightness value of the color ranged from 0.0 to 1.0.

Returns
The brightness value.

Definition at line 255 of file color4d.h.

References b, FromHSV(), g, r, and ToHSV().

Referenced by DrawGraphicHaloText(), KIGFX::SCH_RENDER_SETTINGS::IsBackgroundDark(), KIGFX::PCB_RENDER_SETTINGS::IsBackgroundDark(), and EDA_DRAW_PANEL::OnPaint().

256  {
257  // Weighted W3C formula
258  return r * 0.299 + g * 0.587 + b * 0.117;
259  }
double g
Green component.
Definition: color4d.h:288
double b
Blue component.
Definition: color4d.h:289
double r
Red component.
Definition: color4d.h:287
COLOR4D& KIGFX::COLOR4D::Invert ( )
inline

Function Invert Makes the color inverted, alpha remains the same.

Returns
COLOR4D& Inverted color.

Definition at line 181 of file color4d.h.

References b, g, r, and Saturate().

Referenced by EDA_DRAW_PANEL::GetScreen().

182  {
183  r = ( 1.0 - r );
184  g = ( 1.0 - g );
185  b = ( 1.0 - b );
186 
187  return *this;
188  }
double g
Green component.
Definition: color4d.h:288
double b
Blue component.
Definition: color4d.h:289
double r
Red component.
Definition: color4d.h:287
COLOR4D KIGFX::COLOR4D::Inverted ( ) const
inline

Function Inverted Returns an inverted color, alpha remains the same.

Returns
COLOR4D& Inverted color.

Definition at line 245 of file color4d.h.

References a, b, COLOR4D(), g, and r.

Referenced by KIGFX::PCB_RENDER_SETTINGS::ImportLegacyColors().

246  {
247  return COLOR4D( 1.0 - r, 1.0 - g, 1.0 - b, a );
248  }
double g
Green component.
Definition: color4d.h:288
double b
Blue component.
Definition: color4d.h:289
double a
Alpha component.
Definition: color4d.h:290
double r
Red component.
Definition: color4d.h:287
COLOR4D & COLOR4D::Saturate ( double  aFactor)

Saturates the color to a given factor (in HSV model)

Definition at line 413 of file color4d.cpp.

References b, BLACK, FromHSV(), g, r, ToHSV(), UNSPECIFIED, and WHITE.

Referenced by Invert().

414 {
415  // One can saturate a color only when r, v, b are not equal
416  if( r == g && r == b )
417  return *this;
418 
419  double h, s, v;
420 
421  ToHSV( h, s, v, true );
422  FromHSV( h, aFactor, 1.0 );
423 
424  return *this;
425 }
double g
Green component.
Definition: color4d.h:288
void ToHSV(double &aOutHue, double &aOutSaturation, double &aOutValue, bool aAlwaysDefineHue=false) const
Function ToHSV() Converts current color (stored in RGB) to HSV format.
Definition: color4d.cpp:286
double b
Blue component.
Definition: color4d.h:289
void FromHSV(double aInH, double aInS, double aInV)
Function FromHSV() Changes currently used color to the one given by hue, saturation and value paramet...
Definition: color4d.cpp:339
double r
Red component.
Definition: color4d.h:287
void COLOR4D::ToHSV ( double &  aOutHue,
double &  aOutSaturation,
double &  aOutValue,
bool  aAlwaysDefineHue = false 
) const

Function ToHSV() Converts current color (stored in RGB) to HSV format.

Parameters
aOutHueis the conversion result for hue component, in degrees 0 ... 360.0
aOutSaturationis the conversion result for saturation component (0 ... 1.0).
aOutValueis conversion result for value component (0 ... 1.0).
aAlwaysDefineHuecontrols the way hue is defined when r = v = b
Note
saturation is set to 0.0 for black color (r = v = b = 0), and if r = v = b, hue is set to 0.0 if aAlwaysDefineHue = true, and set to NAN if aAlwaysDefineHue = false. this option is usefull to convert a 4D color to a legacy color, because Red has hue = 0, therefore aAlwaysDefineHue = false makes difference between Red and Gray colors.

Definition at line 286 of file color4d.cpp.

References b, delta, g, max, min, and r.

Referenced by DIALOG_COLOR_PICKER::buttColorClick(), COLOR4D(), DIALOG_COLOR_PICKER::DIALOG_COLOR_PICKER(), GetBrightness(), DIALOG_COLOR_PICKER::onRGBMouseDrag(), Saturate(), and DIALOG_COLOR_PICKER::SetEditVals().

287 {
288  double min, max, delta;
289 
290  min = r < g ? r : g;
291  min = min < b ? min : b;
292 
293  max = r > g ? r : g;
294  max = max > b ? max : b;
295 
296  aOutValue = max; // value
297  delta = max - min;
298 
299  if( max > 0.0 )
300  {
301  aOutSaturation = ( delta / max );
302  }
303  else // for black color (r = g = b = 0 ) saturation is set to 0.
304  {
305  aOutSaturation = 0.0;
306  aOutHue = aAlwaysDefineHue ? 0.0 : NAN;
307  return;
308  }
309 
310  /* Hue in degrees (0...360) is coded according to this table
311  * 0 or 360 : red
312  * 60 : yellow
313  * 120 : green
314  * 180 : cyan
315  * 240 : blue
316  * 300 : magenta
317  */
318  if( delta != 0.0 )
319  {
320  if( r >= max )
321  aOutHue = ( g - b ) / delta; // between yellow & magenta
322  else if( g >= max )
323  aOutHue = 2.0 + ( b - r ) / delta; // between cyan & yellow
324  else
325  aOutHue = 4.0 + ( r - g ) / delta; // between magenta & cyan
326 
327  aOutHue *= 60.0; // degrees
328 
329  if( aOutHue < 0.0 )
330  aOutHue += 360.0;
331  }
332  else // delta = 0 means r = g = b. hue is set to 0.0
333  {
334  aOutHue = aAlwaysDefineHue ? 0.0 : NAN;
335  }
336 }
double g
Green component.
Definition: color4d.h:288
static const int delta[8][2]
Definition: solve.cpp:112
double b
Blue component.
Definition: color4d.h:289
#define max(a, b)
Definition: auxiliary.h:86
double r
Red component.
Definition: color4d.h:287
#define min(a, b)
Definition: auxiliary.h:85
COLOR4D KIGFX::COLOR4D::WithAlpha ( double  aAlpha) const
inline

Function WithAlpha Returns a colour with the same colour, but the given alpha.

Parameters
aAlphaspecifies the alpha of the new color
Returns
COLOR4D color with that alpha

Definition at line 233 of file color4d.h.

References b, COLOR4D(), g, and r.

Referenced by LAYER_SELECTOR::DrawColorSwatch(), drawLineWithHilight(), COLOR_SWATCH::MakeBitmap(), ZONE_CREATE_HELPER::OnFirstPoint(), PCB_EDIT_FRAME::PrepareLayerIndicator(), and PARAM_CFG_SETCOLOR::ReadParam().

234  {
235  assert( aAlpha >= 0.0 && aAlpha <= 1.0 );
236 
237  return COLOR4D( r, g, b, aAlpha );
238  }
double g
Green component.
Definition: color4d.h:288
double b
Blue component.
Definition: color4d.h:289
double r
Red component.
Definition: color4d.h:287

Member Data Documentation

double KIGFX::COLOR4D::b

Blue component.

Definition at line 289 of file color4d.h.

Referenced by KIGFX::OPENGL_GAL::BitmapText(), KIGFX::OPENGL_GAL::blitCursor(), Brighten(), Brightened(), DIALOG_COLOR_PICKER::buttColorClick(), KIGFX::CAIRO_GAL_BASE::ChangeGroupColor(), KIGFX::VERTEX_MANAGER::ChangeItemColor(), KIGFX::OPENGL_COMPOSITOR::ClearBuffer(), KIGFX::CAIRO_GAL_BASE::ClearScreen(), KIGFX::VERTEX_MANAGER::Color(), COLOR4D(), DIALOG_COLOR_PICKER::createRGBBitmap(), CUSTOM_COLOR_ITEM::CUSTOM_COLOR_ITEM(), Darken(), Darkened(), KIGFX::OPENGL_GAL::DrawArc(), KIGFX::CAIRO_GAL_BASE::DrawArcSegment(), KIGFX::OPENGL_GAL::DrawArcSegment(), KIGFX::OPENGL_GAL::drawBitmapOverbar(), KIGFX::OPENGL_GAL::DrawCircle(), KIGFX::OPENGL_GAL::DrawGrid(), KIGFX::CAIRO_GAL_BASE::drawGridLine(), KIGFX::CAIRO_GAL_BASE::DrawGroup(), KIGFX::OPENGL_GAL::DrawLine(), KIGFX::OPENGL_GAL::drawPolygon(), KIGFX::OPENGL_GAL::drawPolyline(), KIGFX::OPENGL_GAL::DrawRectangle(), DIALOG_COLOR_PICKER::drawRGBPalette(), KIGFX::CAIRO_GAL_BASE::DrawSegment(), KIGFX::OPENGL_GAL::DrawSegment(), KIGFX::OPENGL_GAL::drawSemiCircle(), KIGFX::OPENGL_GAL::drawTriangulatedPolyset(), KIGFX::CAIRO_GAL_BASE::flushPath(), FromHSV(), GetBrightness(), CINFO3D_VISU::GetColor(), getDXFColorName(), CINFO3D_VISU::GetLayerColor(), Invert(), Inverted(), DIALOG_COLOR_PICKER::OnChangeEditBlue(), DIALOG_COLOR_PICKER::onRGBMouseDrag(), KIGFX::operator==(), Saturate(), EDA_3D_VIEWER::Set3DColorFromUser(), PSLIKE_PLOTTER::SetColor(), DIALOG_COLOR_PICKER::SetEditVals(), KIGFX::CAIRO_GAL_BASE::SetFillColor(), DIALOG_COLOR_PICKER::setIconColor(), KIGFX::CAIRO_GAL_BASE::SetStrokeColor(), KIGFX::CAIRO_GAL_BASE::storePath(), ToHSV(), and WithAlpha().

double KIGFX::COLOR4D::g

Green component.

Definition at line 288 of file color4d.h.

Referenced by KIGFX::OPENGL_GAL::BitmapText(), KIGFX::OPENGL_GAL::blitCursor(), Brighten(), Brightened(), DIALOG_COLOR_PICKER::buttColorClick(), KIGFX::CAIRO_GAL_BASE::ChangeGroupColor(), KIGFX::VERTEX_MANAGER::ChangeItemColor(), KIGFX::OPENGL_COMPOSITOR::ClearBuffer(), KIGFX::CAIRO_GAL_BASE::ClearScreen(), KIGFX::VERTEX_MANAGER::Color(), COLOR4D(), DIALOG_COLOR_PICKER::createRGBBitmap(), CUSTOM_COLOR_ITEM::CUSTOM_COLOR_ITEM(), Darken(), Darkened(), KIGFX::OPENGL_GAL::DrawArc(), KIGFX::CAIRO_GAL_BASE::DrawArcSegment(), KIGFX::OPENGL_GAL::DrawArcSegment(), KIGFX::OPENGL_GAL::drawBitmapOverbar(), KIGFX::OPENGL_GAL::DrawCircle(), KIGFX::OPENGL_GAL::DrawGrid(), KIGFX::CAIRO_GAL_BASE::drawGridLine(), KIGFX::CAIRO_GAL_BASE::DrawGroup(), KIGFX::OPENGL_GAL::DrawLine(), KIGFX::OPENGL_GAL::drawPolygon(), KIGFX::OPENGL_GAL::drawPolyline(), KIGFX::OPENGL_GAL::DrawRectangle(), DIALOG_COLOR_PICKER::drawRGBPalette(), KIGFX::CAIRO_GAL_BASE::DrawSegment(), KIGFX::OPENGL_GAL::DrawSegment(), KIGFX::OPENGL_GAL::drawSemiCircle(), KIGFX::OPENGL_GAL::drawTriangulatedPolyset(), KIGFX::CAIRO_GAL_BASE::flushPath(), FromHSV(), GetBrightness(), CINFO3D_VISU::GetColor(), getDXFColorName(), CINFO3D_VISU::GetLayerColor(), Invert(), Inverted(), DIALOG_COLOR_PICKER::OnChangeEditGreen(), DIALOG_COLOR_PICKER::onRGBMouseDrag(), KIGFX::operator==(), Saturate(), EDA_3D_VIEWER::Set3DColorFromUser(), PSLIKE_PLOTTER::SetColor(), DIALOG_COLOR_PICKER::SetEditVals(), KIGFX::CAIRO_GAL_BASE::SetFillColor(), DIALOG_COLOR_PICKER::setIconColor(), KIGFX::CAIRO_GAL_BASE::SetStrokeColor(), KIGFX::CAIRO_GAL_BASE::storePath(), ToHSV(), and WithAlpha().

double KIGFX::COLOR4D::r

Red component.

Definition at line 287 of file color4d.h.

Referenced by KIGFX::OPENGL_GAL::BitmapText(), KIGFX::OPENGL_GAL::blitCursor(), Brighten(), Brightened(), DIALOG_COLOR_PICKER::buttColorClick(), KIGFX::CAIRO_GAL_BASE::ChangeGroupColor(), KIGFX::VERTEX_MANAGER::ChangeItemColor(), KIGFX::OPENGL_COMPOSITOR::ClearBuffer(), KIGFX::CAIRO_GAL_BASE::ClearScreen(), KIGFX::VERTEX_MANAGER::Color(), COLOR4D(), DIALOG_COLOR_PICKER::createRGBBitmap(), CUSTOM_COLOR_ITEM::CUSTOM_COLOR_ITEM(), Darken(), Darkened(), KIGFX::OPENGL_GAL::DrawArc(), KIGFX::CAIRO_GAL_BASE::DrawArcSegment(), KIGFX::OPENGL_GAL::DrawArcSegment(), KIGFX::OPENGL_GAL::drawBitmapOverbar(), KIGFX::OPENGL_GAL::DrawCircle(), KIGFX::OPENGL_GAL::DrawGrid(), KIGFX::CAIRO_GAL_BASE::drawGridLine(), KIGFX::CAIRO_GAL_BASE::DrawGroup(), KIGFX::OPENGL_GAL::DrawLine(), KIGFX::OPENGL_GAL::drawPolygon(), KIGFX::OPENGL_GAL::drawPolyline(), KIGFX::OPENGL_GAL::DrawRectangle(), DIALOG_COLOR_PICKER::drawRGBPalette(), KIGFX::CAIRO_GAL_BASE::DrawSegment(), KIGFX::OPENGL_GAL::DrawSegment(), KIGFX::OPENGL_GAL::drawSemiCircle(), KIGFX::OPENGL_GAL::drawTriangulatedPolyset(), KIGFX::CAIRO_GAL_BASE::flushPath(), FromHSV(), GetBrightness(), CINFO3D_VISU::GetColor(), getDXFColorName(), CINFO3D_VISU::GetLayerColor(), Invert(), Inverted(), DIALOG_COLOR_PICKER::OnChangeEditRed(), DIALOG_COLOR_PICKER::onRGBMouseDrag(), KIGFX::operator==(), Saturate(), EDA_3D_VIEWER::Set3DColorFromUser(), PSLIKE_PLOTTER::SetColor(), DIALOG_COLOR_PICKER::SetEditVals(), KIGFX::CAIRO_GAL_BASE::SetFillColor(), DIALOG_COLOR_PICKER::setIconColor(), KIGFX::CAIRO_GAL_BASE::SetStrokeColor(), KIGFX::CAIRO_GAL_BASE::storePath(), ToHSV(), and WithAlpha().

return COLOR4D::UNSPECIFIED
static

For legacy support; used as a value to indicate color hasn't been set yet.

Definition at line 293 of file color4d.h.

Referenced by COLOR4D(), and Saturate().

const COLOR4D COLOR4D::WHITE
static

Definition at line 296 of file color4d.h.

Referenced by Saturate().


The documentation for this class was generated from the following files: