Warning, /frameworks/kconfigwidgets/docs/DESIGN.COLOR is written in an unsupported language. File is not indexed.
0001 Color Management in KDE 0002 0003 Colors are in important part of KDE and are an important tool to make 0004 a good looking desktop. Colors can also be a burden, especially for 0005 people with visual impairments. 0006 0007 The goal of color management is to take full advantage of colors while 0008 reducing the disadvantages of color use to a minimum. 0009 0010 Color Schemes 0011 ============= 0012 0013 Color Management is based around the concept of color schemes. 0014 A color scheme defines colors for different elements in the 0015 UI. The most important factor for the readability of a UI is the 0016 contrast between foreground and background colors. Colors in a color 0017 scheme are therefore grouped in pairs which define the foreground and 0018 background color for a UI element. When composing a color scheme care 0019 should be taken to use sufficiently contrasting colors for fore- and 0020 background in the same group. When using colors in applications, care 0021 should be taken never to mix foreground colors from one group with 0022 background colors from another group: they do not necasserily have any 0023 contrast at all which can lead to a completely unreadable UI. 0024 0025 Color schemes are supported by Qt (see QColorGroup) and can be 0026 configured on a KDE wide basis from the Control Panel. The settings 0027 are stored in the global KDE configuration file under the "General" 0028 setting. The KApplication class takes care that the configured 0029 settings are passed on to Qt. Application developers can just use the 0030 values provided by QColorGroup. 0031 0032 There are three major color categories: 0033 0034 General 0035 ======= 0036 The colors in this group are used when no particular other group is 0037 relevant. 0038 0039 QColorGroup...: ColorRole::Background, background() 0040 KDE config key: background 0041 Control Center: i18n("Window Background") 0042 Description...: General background color 0043 Example use...: Background of dialogs 0044 0045 QColorGroup...: ColorRole::Foreground, foreground() 0046 KDE config key: foreground 0047 Control Center: i18n("Window Text") 0048 Description...: General foreground color 0049 Example use...: Text in dialogs 0050 0051 Text Areas 0052 ========== 0053 The colors in this group are used where the user can type text. it is 0054 also used for lists from which the user can choose. 0055 0056 QColorGroup...: ColorRole::Base, base() 0057 KDE config key: windowBackground 0058 Control Center: i18n("Standard background") 0059 Description...: Background color for text areas. 0060 Example use...: Background in a word-processor. 0061 0062 QColorGroup...: ColorRole::Text, text() 0063 KDE config key: windowForeground 0064 Control Center: i18n("Standard text") 0065 Description...: Text color for text areas. 0066 Example use...: Text in a word-processor. 0067 0068 QColorGroup...: ColorRole::Highlight, highlight() 0069 KDE config key: selectBackground 0070 Control Center: i18n("Select background") 0071 Description...: Background color for selected text. 0072 Example use...: In a selection list. 0073 0074 QColorGroup...: ColorRole::HighlightedText, highlightedText() 0075 KDE config key: selectForeground 0076 Control Center: i18n("Select text") 0077 Description...: Text color for selected text. 0078 Example use...: In a selection list. 0079 0080 "Base" and "Text" should have high contrast as well as "Highlight" and 0081 "HighlightedText". In addition, "Highlight"/"HighlightedText" and 0082 "Base"/"Text" are supposed to be sufficiently different to get a clear 0083 indication of what is selected and what is not. 0084 0085 Buttons 0086 ======= 0087 The colors used in this category are used for buttons in the broad 0088 sense, including e.g.scrollbars, menubars and 0089 popup-menus. 0090 0091 QColorGroup...: ColorRole::Button, button() 0092 KDE config key: buttonBackground 0093 Control Center: i18n("Button background") 0094 Description...: Background color for buttons. 0095 Example use...: Background color of the OK button in a messagebox. 0096 0097 QColorGroup...: ColorRole::ButtonText, buttonText() 0098 KDE config key: buttonForeground 0099 Control Center: i18n("Button text") 0100 Description...: Color for text on buttons. 0101 Example use...: Color of the OK text on a button in a messagebox. 0102 0103 0104 In addition to the above colors a number of derived colors are 0105 defined.They are all darker of lighter version of "Background". 0106 0107 QColorGroup...: ColorRole::Shadow, shadow() 0108 Description...: Used for shadow effects.(Very dark) 0109 0110 QColorGroup...: ColorRold::BrightText, brightText() 0111 Description...: Used for text on pushed pushbuttons 0112 0113 QColorGroup...: ColorRole::Light, light() 0114 Description...: Lighter than "Button" 0115 0116 QColorGroup...: ColorRole::Midlight, midlight() 0117 Description...: Between "Button" and "Light" 0118 0119 QColorGroup...: ColorRole::Dark, dark() 0120 Description...: Darker than "Button" 0121 0122 QColorGroup...: ColorRole::Mid, mid() 0123 Description...: Between "Button" and "Dark" 0124 0125 Well Behaved Applications 0126 ======================== 0127 0128 Applications should never hardcode colors but always default to the 0129 colors from the users color scheme. This ensures consistency among 0130 applications on the desktop. It also ensures that all applications 0131 are equally readable. 0132 0133 An application may offer the user an option to change the color of 0134 certain aspects of the application. It should be noted that an 0135 application specific color setting can cause unexpected results when 0136 the user changes its color scheme. The application specific color may 0137 look ugly in combination with other color schemes or the resulting UI 0138 may even become unreadable. Therefore applications specific colors 0139 should be used with care. 0140 0141