Jump to content
Main menu
Main menu
move to sidebar
hide
Navigation
Main page
Recent changes
Random page
Help about MediaWiki
Special pages
Niidae Wiki
Search
Search
Appearance
Create account
Log in
Personal tools
Create account
Log in
Pages for logged out editors
learn more
Contributions
Talk
Editing
Video Graphics Array
(section)
Page
Discussion
English
Read
Edit
View history
Tools
Tools
move to sidebar
hide
Actions
Read
Edit
View history
General
What links here
Related changes
Page information
Appearance
move to sidebar
hide
Warning:
You are not logged in. Your IP address will be publicly visible if you make any edits. If you
log in
or
create an account
, your edits will be attributed to your username, along with other benefits.
Anti-spam check. Do
not
fill this in!
==Color palette== {{See also|List of monochrome and RGB color formats|List of monochrome and RGB color formats#18-bit RGB|l2=18-bit RGB|List of 16-bit computer color palettes|List of 16-bit computer hardware palettes#MCGA and VGA|l4=MCGA and VGA}} [[file:VGA palette with black borders.svg|thumb|VGA 256 default color palette]] [[file:VGA palette organised.svg|thumb|VGA palette organised into 4 groups]] [[file:Torak.gif|thumb|Examples of VGA images in 640Γ480 with 16 colors and 320Γ200 with 256 colors (bottom). [[Dither]]ing is used to mask color limitations.]] The VGA color system uses register-based palettes to map colors in various bit depths to its 18-bit output gamut. It is [[backward compatible]] with the EGA and CGA adapters, but supports extra [[Bit depth (computer graphics)|bit depth]] for the palette when in these modes. For instance, when in EGA 16-color modes, VGA offers 16 palette registers, and in 256-color modes, it offers 256 registers.<ref>{{Cite web|title=VGA/SVGA Video Programming--Color Regsters|url=http://www.scs.stanford.edu/17wi-cs140/pintos/specs/freevga/vga/colorreg.htm|access-date=2020-08-16|website=www.scs.stanford.edu}}</ref> Each palette register contain a [[List of monochrome and RGB color formats#18-bit RGB|3Γ6 bit]] RGB value, selecting a color from the 18-bit gamut of the [[Digital-to-analog converter|DAC]]. These color registers are initialized to default values IBM expected to be most useful for each mode. For instance, EGA 16-color modes initialize to the default CGA 16-color palette, and the 256-color mode initializes to a palette consisting of 16 CGA colors, 16 grey shades, and then 216 colors chosen by IBM to fit expected use cases.<ref>{{Cite book|url=http://classiccomputers.info/down/IBM_PS2/documents/PS2_Hardware_Interface_Technical_Reference_May88.pdf|title=IBM PS/2 Hardware Interface Technical Reference Manual|pages=13β18}}</ref><ref>[https://retrocomputing.stackexchange.com/questions/27994/why-were-those-colors-chosen-to-be-the-default-palette-for-256-color-vga retrocomputing SE question: why-were-those-colors-chosen-to-be-the-default-palette-for-256-color-vga ?]</ref> After initialization they can be redefined at any time without altering the contents of video RAM, permitting [[Color cycling|palette cycling]]. In the 256-color modes, the DAC is set to combine four 2-bit color values, one from each plane, into an 8-bit-value representing an index into the 256-color palette. The CPU interface combines the 4 planes in the same way, a feature called "chain-4", so that each pixel appears to the CPU as a packed 8-bit value representing the palette index.<ref>Uphoff, Matthias (1990). ''Die Programmierung der EGA/VGA Grafikkarte''; {{ISBN|3-89319-274-3}}; this whole section was learned from this book</ref>
Summary:
Please note that all contributions to Niidae Wiki may be edited, altered, or removed by other contributors. If you do not want your writing to be edited mercilessly, then do not submit it here.
You are also promising us that you wrote this yourself, or copied it from a public domain or similar free resource (see
Encyclopedia:Copyrights
for details).
Do not submit copyrighted work without permission!
Cancel
Editing help
(opens in new window)
Search
Search
Editing
Video Graphics Array
(section)
Add topic