Open main menu
Home
Random
Recent changes
Special pages
Community portal
Preferences
About Wikipedia
Disclaimers
Incubator escapee wiki
Search
User menu
Talk
Dark mode
Contributions
Create account
Log in
Editing
RGB color model
(section)
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!
==Colors in web-page design== {{Main|Web colors}} Initially, the limited color depth of most video hardware led to a limited color palette of 216 RGB colors, defined by the Netscape Color Cube. The [[Web-safe colors|web-safe color]] palette consists of the 216 (6<sup>3</sup>) combinations of red, green, and blue where each color can take one of six values (in [[hexadecimal]]): #00, #33, #66, #99, #CC or #FF (based on the 0 to 255 range for each value discussed above). These hexadecimal values = 0, 51, 102, 153, 204, 255 in decimal, which = 0%, 20%, 40%, 60%, 80%, 100% in terms of intensity. This seems fine for splitting up 216 colors into a cube of dimension 6. However, lacking gamma correction, the perceived intensity on a standard 2.5 gamma CRT / LCD is only: 0%, 2%, 10%, 28%, 57%, 100%. See the actual web safe color palette for a visual confirmation that the majority of the colors produced are very dark.<ref>For a side-by-side comparison of proper colors next to their equivalent lacking proper gamma correction, see {{cite web |url=http://xona.com/colorlist/ |title=Color List |website=Xona Games |date=15 March 2006 |first=Matthew |last=Doucette}}</ref> With the predominance of 24-bit displays, the use of the full 16.7 million colors of the HTML RGB color code no longer poses problems for most viewers. The [[sRGB]] color space (a ''device-independent'' color space<ref name="auto1">{{Cite web|url=https://www.mathworks.com/help/images/device-independent-color-spaces.html|title=Device-Independent Color Spaces - MATLAB & Simulink|website=www.mathworks.com}}</ref>) for [[HTML]] was formally adopted as an Internet standard in HTML 3.2,<ref>{{cite web |url= http://www.w3.org/TR/REC-html32 |title=HTML 3.2 Reference Specification |date=14 January 1997}}</ref><ref>{{Cite web|url=https://www.w3.org/Graphics/Color/sRGB.html|title=A Standard Default Color Space for the Internet - sRGB|website=W3C }}</ref> though it had been in use for some time before that. All images and colors are interpreted as being sRGB (unless another color space is specified) and all modern displays can display this color space (with color management being built in into browsers<ref>{{Cite web|url=https://www.color-management-guide.com/web-browser-color-management.html|title=Color management in Internet|website=www.color-management-guide.com}}</ref><ref name="auto">{{Cite web|url=https://gregbenzphotography.com/photography-tips/how-to-setup-proper-color-management-in-a-web-browser|title=How to setup proper color management in your web browser - Greg Benz Photography|date=April 27, 2021|website=gregbenzphotography.com}}</ref> or operating systems<ref>{{Cite web|url=https://support.microsoft.com/en-au/windows/about-color-management-2a2ed8fa-cf09-83c5-e55c-d1428519f616|title=About Color Management|website=support.microsoft.com}}</ref>). The syntax in [[CSS]] is: rgb(#,#,#) where # equals the proportion of red, green, and blue respectively. This syntax can be used after such selectors as "background-color:" or (for text) "color:". Wide gamut color is possible in modern [[CSS]],<ref>{{Cite web|url=https://webkit.org/blog/10042/wide-gamut-color-in-css-with-display-p3/|title=Wide Gamut Color in CSS with Display-P3|date=March 2, 2020}}</ref> being supported by all major browsers since 2023.<ref>{{Cite web|url=https://caniuse.com/?search=color|title="color" Can I use... Support tables for HTML5, CSS3, etc|website=[[Can I use...]]}}</ref><ref>{{Cite web |date=March 2, 2020 |title=Wide Gamut Color in CSS with Display-P3 |url=https://webkit.org/blog/10042/wide-gamut-color-in-css-with-display-p3/}}</ref><ref>{{Cite web |title=CSS color() function |url=https://caniuse.com/css-color-function |website=[[Can I use...]]}}</ref> For example, a color on the [[DCI-P3]] color space can be indicated as: color(display-p3 # # #) where # equals the proportion of red, green, and blue in 0.0 to 1.0 respectively.
Edit summary
(Briefly describe your changes)
By publishing changes, you agree to the
Terms of Use
, and you irrevocably agree to release your contribution under the
CC BY-SA 4.0 License
and the
GFDL
. You agree that a hyperlink or URL is sufficient attribution under the Creative Commons license.
Cancel
Editing help
(opens in new window)