| Wireshark 4.7.0 The Wireshark network protocol analyzer

Loading...
Searching...
No Matches
Public Member Functions | Static Public Member Functions | Static Public Attributes | List of all members
ColorUtils Class Reference
Inheritance diagram for ColorUtils:

## Public Member Functions
| ColorUtils (QObject *parent=0)

## Static Public Member Functions
static QColor | fromColorT (const color_t *color)
static QColor | fromColorT (color_t color)
static const color_t | toColorT (const QColor color)
static QRgb | alphaBlend (const QColor &color1, const QColor &color2, qreal alpha)
static QRgb | alphaBlend (const QBrush &brush1, const QBrush &brush2, qreal alpha)
static const QList< QRgb > | graphColors ()
static QRgb | graphColor (int item)
static QRgb | sequenceColor (int item)
static bool | themeIsDark ()
static void | setScheme (int scheme)
static QBrush | themeLinkBrush ()
static QString | themeLinkStyle ()
static const QColor | contrastingTextColor (const QColor color)
static const QColor | hoverBackground ()
static const QColor | warningBackground ()
static const QColor | disabledForeground ()

## Static Public Attributes
static const QColor | expert_color_comment = QColor (0xb7, 0xf7, 0x74)
static const QColor | expert_color_chat = QColor (0x80, 0xb7, 0xf7)
static const QColor | expert_color_note = QColor (0xa0, 0xff, 0xff)
static const QColor | expert_color_warn = QColor (0xf7, 0xf2, 0x53)
static const QColor | expert_color_error = QColor (0xff, 0x5c, 0x5c)
static const QColor | expert_color_foreground = QColor (0x00, 0x00, 0x00)
static const QColor | hidden_proto_item = QColor (0x44, 0x44, 0x44)

## Member Function Documentation

## ◆ contrastingTextColor()

const QColor ColorUtils::contrastingTextColor | ( | const QColor | color | ) |
| static

Returns either QPalette::Text or QPalette::Base as appropriate for the specified foreground color

Parameters

  color | The background color.

Returns
  A contrasting foreground color for the current mode / theme.

## ◆ disabledForeground()

const QColor ColorUtils::disabledForeground | ( |  | ) |
| static

Returns an appropriate foreground color for disabled text.

Returns
  The foreground color.

## ◆ hoverBackground()

const QColor ColorUtils::hoverBackground | ( |  | ) |
| static

Returns an appropriate background color for hovered abstract items.

Returns
  The background color.

## ◆ themeIsDark()

bool ColorUtils::themeIsDark | ( |  | ) |
| static

Checks if our application is in "dark mode". Dark mode is determined by comparing the application palette's window text color with the window color.

Returns
  true if we're running in dark mode, false otherwise.

## ◆ themeLinkBrush()

QBrush ColorUtils::themeLinkBrush | ( |  | ) |
| static

Returns an appropriate link color for the current mode.

Returns
  A brush suitable for setting a text color.

## ◆ themeLinkStyle()

QString ColorUtils::themeLinkStyle | ( |  | ) |
| static

Returns an appropriate HTML+CSS link style for the current mode.

Returns
  A "<style>a:link { color: ... ; }</style>" string

## ◆ warningBackground()

const QColor ColorUtils::warningBackground | ( |  | ) |
| static

Returns an appropriate warning background color for the current mode.

Returns
  The background color.

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

- /builds/wireshark/wireshark/ui/qt/utils/color_utils.h
- /builds/wireshark/wireshark/ui/qt/utils/color_utils.cpp