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!
===Shorthand hexadecimal form=== An abbreviated, three (hexadecimal)-digit or four-digit form can be used,<ref>{{cite web |url=http://www.w3.org/TR/css3-color/#rgb-color |publisher=W3C |work=CSS Color Module Level 3 |title=4.2.1. RGB color values |date=7 June 2011 |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 |access-date=19 March 2013 }}</ref> but can cause errors if software or maintenance scripts are only expecting the long form. Expanding this form to the six-digit form is as simple as repeating each digit: 09C becomes 0099CC as presented on the following [[Cascading Style Sheets|CSS]] example: <syntaxhighlight lang="css"> .threedigit { color: #09C; } .sixdigit { color: #0099CC; } /* same color as above */ </syntaxhighlight> This shorthand form reduces the palette to 4,096 colors, equivalent of 12-bit color as opposed to 24-bit color using the whole six-digit form (16,777,216 colors). This limitation is sufficient for many text-based documents.
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)