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
Web colors
(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!
{{short description|Color used in designing web pages}} {{Use dmy dates|date=October 2014}} {{Use American English|date=October 2020}} {{Html series}} '''Web colors''' are [[color]]s used in [[Web design|displaying web pages]] on the [[World Wide Web]]; they can be described by way of three methods: a color may be specified as an [[RGB color model|RGB]] triplet, in [[hexadecimal]] format (a ''hex triplet'') or according to its common English name in some cases. A [[color tool]] or other [[graphics software]] is often used to generate color values. In some uses, '''hexadecimal color''' codes are specified with notation using a leading [[number sign]] (#).<ref>{{cite book | last = Niederst Robbins | first = Jennifer | title = Web Design in a Nutshell | publisher = O'Reilly |date=February 2006 |page=830 | isbn = 978-0-596-00987-8 |chapter=Appendix D: Specifying Color }}</ref><ref>York, Richard. ''Beginning CSS'', pp. 71β72.</ref> A color is specified according to the intensity of its red, green and blue components, each represented by eight [[bit]]s. Thus, there are 24 bits used to specify a web color within the [[sRGB]] gamut, and 16,777,216 colors that may be so specified. Colors outside the sRGB gamut can be specified in [[CSS|Cascading Style Sheets]] by making one or more of the red, green and blue components negative or greater than 100%, so the color space is theoretically an unbounded extrapolation of sRGB similar to [[scRGB]].<ref>{{cite web |url=https://www.w3.org/TR/css3-color/#rgb-color |at=section 4.2.1. RGB color values |title=CSS Color Module Level 3 |date=7 June 2011 |publisher=W3C |editor1-first=Tantek |editor1-last=Γelik |editor2-first=Chris |editor2-last=Lilley |editor3-first=L. David |editor3-last=Baron |first1=Steven |last1=Pemberton |first2=Brad |last2=Pettit }}</ref> Specifying a non-sRGB color this way requires the <code>RGB()</code> function call. It is impossible with the hexadecimal syntax (and thus impossible in legacy [[HTML]] documents that do not use CSS). The first versions of [[Mosaic (web browser)|Mosaic]] and [[Netscape Navigator]] used the [[X11 color names]] as the basis for their color lists, as both started as [[X Window System]] applications. Web colors have an unambiguous colorimetric definition, [[sRGB]], which relates the [[chromaticity|chromaticities]] of a particular [[phosphor]] set, a given transfer curve, adaptive whitepoint, and viewing conditions.<ref>{{cite book |last1=Sharma |first1=Gaurav |last2=Bala |first2=Raja |title=Digital Color Imaging Handbook |date=19 December 2017 |publisher=CRC Press |isbn=978-1-4200-4148-4 |url=https://books.google.com/books?id=OxlBqY67rl0C&q=srgb&pg=PA89 |language=en}}</ref> These have been chosen to be similar to many real-world [[Computer monitor|monitors]] and viewing conditions, to allow rendering to be fairly close to the specified values even without [[color management]]. [[User agent]]s vary in the fidelity with which they represent the specified colors. More advanced user agents use color management to provide better color fidelity; this is particularly important for [[Web-to-print]] applications.
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)