Avatar

Some hints on colors in CSS (General)

by Alfie ⌂, Vienna, Austria, Sunday, July 27, 2008, 23:46 (5723 days ago) @ Lena

[...] some different color choices (red, green, brown..etc) ?

You may edit your style.css file as well (make a backup before!).
If you are not familiar with CSS:
foreground (the color of letters) is given by

  { color: #RRGGBB;}

and background by

  { background: #RRGGBB;}

RRGGBB stands for the Red, Green, Blue components (0-255) in hexadecimal numbers.
Therefore the number of colors is 256*256*256=16777216.
100% of Red, Green, Blue ist given by #FF0000, #00FF00, #0000FF (you may use lower-case as well).
If you have no idea about hex-notation: on a windows-PC > calculator > change View from "standard" to "scientific" > type e.g. "192" > Hex > "C0".
Another possibility is the use of rgb() notation. Either you may use rgb(RR,GG,BB), where colors are given as their components (allowed 0-255) or rgb(R%,G%,B%) - allowed values 0%-100%. Therefore

  { color: #804000; }
  { color: rgb(128,64,0); }
  { color: rgb(50%,25%,0%); }

are equivalent and give the same color [color=#804000]brown[/color]...

You may use this little tool for experimentation as well (in German; Vordergrundfarbe is color, Hintergrundfarbe is background, click 'Farben anzeigen' to get the result in the right pannel).

--
Cheers,
Alfie (Helmut Schütz)
BEBA-Forum (v1.8β)

locked
5719 views

Complete thread:

 RSS Feed of thread