💾 Archived View for lofi.haiku-os.org › docs › develop › servers › app_server › SystemPalette.gmi captured on 2023-09-28 at 16:09:08. Gemini links have been rewritten to link to archived content
-=-=-=-=-=-=-
This object does all the handling for system attribute colors and system palette management.
_ Denotes a protected function
1. Allocate the rgb_color[256] palette on the heap and call _GenerateSystemPalette()
2. Initialize attribute variables to the defaults
1. Free the palette array
Sets the said index to the passed color value.
Returns the color at said index in the palette.
These tweak or return the system attribute colors, one at a time or all at once.
Sets the passed palette to the BeOS R5 system colors, which follows.
0,0,0 -> 248,248,248 by increments of 8
0,0,255
0,0,229
0,0,204
0,0,179
0,0,154
0,0,129
0,0,105
0,0,80
0,0,55
0,0,30
as per blues, but red values are 1 less
as per blues, but green values are 1 less
0,152,51
255,255,255
The following sets use [255, 203, 152, 102, 51, 0] for the blue values, keeping the other colors the same:
203,255, [value]
152,255, [value]
102,255, [value]
51,255, [value]
255,152, [value]
0,102,255
0,102,203
203,203, [value]
152,255, [value]
102,255, [value]
51,255, [value]
255,102, [value]
0,102,152
0,102,102
203,152, [value]
152,152, [value]
102,152, [value]
51,152, [value]
230,134,0
255,51, [value excepting 255]
0,102,51
0,102,0
203,102, [value]
152,102, [value]
102,102, [value]
51,102, [value]
255,0, [value excepting 0]
255,175,19
0,51,255
0,51,203
203,51, [value]
152,51, [value]
102,51, [value]
51,51, [value]
255,203,102 -> 255,203,255, stepping in the [value] increments
0,51, [value, starting at 152]
203,0, [value, excepting 0]
255,227,70
152,0, [value]
102,0, [value]
51,0, [value]
255,203,51
255,203,0
255,255, [values in reverse]
Sets the internal color_set to the defaults, which is the following:
color_set { rgb_color panel_background rgb_color panel_text rgb_color document_background rgb_color document_text rgb_color control_background rgb_color control_text rgb_color control_border rgb_color control_highlight rgb_color tooltip_background rgb_color tooltip_text rgb_color menu_background rgb_color menu_selected_background rgb_color menu_text rgb_color menu_selected_text rgb_color menu_separator rgb_color menu_triggers }