Overview
Examples
Screenshots
Comparisons
Applications
Download
Documentation
Tutorials
Bazaar
Status & Roadmap
FAQ
Authors & License
Forums
Funding Ultimate++
Search on this site













SourceForge.net Logo

Draw Colors

 

U++ provides a set of colors that are adjusted according to current settings of host platform. Using these colors makes it easier to adapt the application to host platform settings.

 

Following table shows colors that represent certain hue. When transformed to dark theme, hue is maintained while brightness of color changes.

 

Color

Description

Light theme

Dark theme

Color SBlack()

Possibly theme adjusted color.

Color SGray()

Possibly theme adjusted color.

Color SLtGray()

Possibly theme adjusted color.

Color SWhiteGray()

Possibly theme adjusted color.

Color SWhite()

Possibly theme adjusted color.

Color SRed()

Possibly theme adjusted color.

Color SGreen()

Possibly theme adjusted color.

Color SBrown()

Possibly theme adjusted color.

Color SBlue()

Possibly theme adjusted color.

Color SMagenta()

Possibly theme adjusted color.

Color SCyan()

Possibly theme adjusted color.

Color SYellow()

Possibly theme adjusted color.

Color SLtRed()

Possibly theme adjusted color.

Color SLtGreen()

Possibly theme adjusted color.

Color SLtYellow()

Possibly theme adjusted color.

Color SLtBlue()

Possibly theme adjusted color.

Color SLtMagenta()

Possibly theme adjusted color.

Color SLtCyan()

Possibly theme adjusted color.

 

Following colors provide host platform provided information about colors of GUI element parts:

 

Color

Description

Win 10 light

Win 10 dark

Color SColorPaper()

Normal background.

Color SColorText()

Normal text.

Color SColorFace()

Dialog background.

Color SColorHighlight()

Background of selected item.

Color SColorHighlightText()

Text of selected item.

Color SColorMenu()

Normal menu background.

Color SColorMenuText()

Normal text background.

Color SColorInfo()

Tooltip background.

Color SColorInfoText()

Tooltip text.

Color SColorMark()

Marked text, e.g. hyperlink.

Color SColorMenuMark()

Marked text in menu.

Color SColorDisabled()

Disabled item text.

Color SColorLight()

Light side of 3D bezel.

Color SColorLabel()

Label text color.

Color SColorShadow()

Dark side of 3D bezel.

Color SColorLtFace()

Somewhat lighter SColorFace.

Color SColorDkShadow()

Somewhat darker SColorShadow.

 


 

bool IsDarkTheme()

Returns true if SColorPaper is dark, which is indicator of dark theme.

 


 

Color AdjustIfDark(Color c)

If current color scheme is dark, color c (which should be intended for light theme) is adjusted to dark theme.

 


 

Color DefaultInk()

This special pseudo-color is used as default argument to several Draw methods. Inside Draw, DefaultInk is converted to White() if the Draw target is pixels and dark theme is active, otherwise it resolves to Black().

 


 

Color InvertColor()

This special pseudo-color can be used with Draw::DrawRect for pixel targets and instructs DrawRect to invert target pixels (perform binary not on all color channels).

 

Last edit by cxl on 04/11/2019. Do you want to contribute?. T++