Section Intro: Color Manipulation
Meta-HTML provides a few primitives for manipulating HTML color strings
and names. You can convert from hexadecimal notation to decimal notation,
from color names to hex strings and back, create
Associate COLOR with NAME and NICKNAME in the system color tables and arrays. COLOR is the hexadecimal representation of the color, in standard RRGGBB format. NAME is a pretty name of the color, as in "Antique White".
Given a string of hex digits (perhaps with a leading "#"), return the human readable name of that color as defined in our array of color names. The color names are definitely suitable for Netscape, since I got the names off of their pages.
Return the two hex characters which represent BYTE-VALUE, a decimal number between 0 and 255 inclusive.
Given the human readable name of a color in COLOR, return the color value as a string of 6 hex digits: RRGGBB.
<color::hex-value "White Smoke">produces:
Return the "opposite" of COLOR in HTML format. COLOR is supplied
in HTML format as well. For example:
Return the decimal value of HEX-PAIR.
Return an array of decimal values, one for each color in RGB-STRING.
255 224 228
Create an HTML SELECTion pull-down menu containing the list of colors taken from the list of known colors in the system array COLOR::COLOR-NAMES. Assign the choice to VARNAME when the containing form is POSTed.
Create an HTML SELECTion pull-down menu containing a short list of colors including the primaries and hues. Assign the choice to VARNAME when the containing form is POSTed.
The META-HTML Reference Manual V2.0 Copyright © 1995, 1998, Brian J. Fox
Found a bug? Send mail to email@example.com