颜色名称 | 颜色效果 | Hex | HTML |
---|---|---|---|
clBlack | $000000 | #000000 | |
clMaroon | $000080 | #800000 | |
clGreen | $008000 | #008000 | |
clOlive | $008080 | #808000 | |
clNavy | $800000 | #000080 | |
clPurple | $800080 | #800080 | |
clTeal | $808000 | #008080 | |
clGray | $808080 | #808080 | |
clSilver | $C0C0C0 | #C0C0C0 | |
clRed | $0000FF | #FF0000 | |
clLime | $00FF00 | #00FF00 | |
clYellow | $00FFFF | #FFFF00 | |
clBlue | $FF0000 | #0000FF | |
clFuchsia | $FF00FF | #FF00FF | |
clAqua | $FFFF00 | #00FFFF | |
clLtGray | $C0C0C0 | #C0C0C0 | |
clDkGray | $808080 | #808080 | |
clWhite | $FFFFFF | #FFFFFF | |
clMoneyGreen | $C0DCC0 | #C0DCC0 | |
clSkyBlue | $F0CAA6 | #A6CAF0 | |
clCream | $F0FBFF | #FFFBF0 | |
clMedGray | $A4A0A0 | #A0A0A4 | |
clWebSnow | $FAFAFF | #FFFAFA | |
clWebFloralWhite | $F0FAFF | #FFFAF0 | |
clWebLavenderBlush | $F5F0FF | #FFF0F5 | |
clWebOldLace | $E6F5FD | #FDF5E6 | |
clWebIvory | $F0FFFF | #FFFFF0 | |
clWebCornSilk | $DCF8FF | #FFF8DC | |
clWebBeige | $DCF5F5 | #F5F5DC | |
clWebAntiqueWhite | $D7EBFA | #FAEBD7 | |
clWebWheat | $B3DEF5 | #F5DEB3 | |
clWebAliceBlue | $FFF8F0 | #F0F8FF | |
clWebGhostWhite | $FFF8F8 | #F8F8FF | |
clWebLavender | $FAE6E6 | #E6E6FA | |
clWebSeashell | $EEF5FF | #FFF5EE | |
clWebLightYellow | $E0FFFF | #FFFFE0 | |
clWebPapayaWhip | $D5EFFF | #FFEFD5 | |
clWebNavajoWhite | $ADDEFF | #FFDEAD | |
clWebMoccasin | $B5E4FF | #FFE4B5 | |
clWebBurlywood | $87B8DE | #DEB887 | |
clWebAzure | $FFFFF0 | #F0FFFF | |
clWebMintcream | $FAFFF5 | #F5FFFA | |
clWebHoneydew | $F0FFF0 | #F0FFF0 | |
clWebLinen | $E6F0FA | #FAF0E6 | |
clWebLemonChiffon | $CDFAFF | #FFFACD | |
clWebBlanchedAlmond | $CDEBFF | #FFEBCD | |
clWebBisque | $C4E4FF | #FFE4C4 | |
clWebPeachPuff | $B9DAFF | #FFDAB9 | |
clWebTan | $8CB4D2 | #D2B48C | |
clWebYellow | $00FFFF | #FFFF00 | |
clWebDarkOrange | $008CFF | #FF8C00 | |
clWebRed | $0000FF | #FF0000 | |
clWebDarkRed | $00008B | #8B0000 | |
clWebMaroon | $000080 | #800000 | |
clWebIndianRed | $5C5CCD | #CD5C5C | |
clWebSalmon | $7280FA | #FA8072 | |
clWebCoral | $507FFF | #FF7F50 | |
clWebGold | $00D7FF | #FFD700 | |
clWebTomato | $4763FF | #FF6347 | |
clWebCrimson | $3C14DC | #DC143C | |
clWebBrown | $2A2AA5 | #A52A2A | |
clWebChocolate | $1E69D2 | #D2691E | |
clWebSandyBrown | $60A4F4 | #F4A460 | |
clWebLightSalmon | $7AA0FF | #FFA07A | |
clWebLightCoral | $8080F0 | #F08080 | |
clWebOrange | $00A5FF | #FFA500 | |
clWebOrangeRed | $0045FF | #FF4500 | |
clWebFirebrick | $2222B2 | #B22222 | |
clWebSaddleBrown | $13458B | #8B4513 | |
clWebSienna | $2D52A0 | #A0522D | |
clWebPeru | $3F85CD | #CD853F | |
clWebDarkSalmon | $7A96E9 | #E9967A | |
clWebRosyBrown | $8F8FBC | #BC8F8F | |
clWebPaleGoldenrod | $AAE8EE | #EEE8AA | |
clWebLightGoldenrodYellow | $D2FAFA | #FAFAD2 | |
clWebOlive | $008080 | #808000 | |
clWebForestGreen | $228B22 | #228B22 | |
clWebGreenYellow | $2FFFAD | #ADFF2F | |
clWebChartreuse | $00FF7F | #7FFF00 | |
clWebLightGreen | $90EE90 | #90EE90 | |
clWebAquamarine | $D4FF7F | #7FFFD4 | |
clWebSeaGreen | $578B2E | #2E8B57 | |
clWebGoldenRod | $20A5DA | #DAA520 | |
clWebKhaki | $8CE6F0 | #F0E68C | |
clWebOliveDrab | $238E6B | #6B8E23 | |
clWebGreen | $008000 | #008000 | |
clWebYellowGreen | $32CD9A | #9ACD32 | |
clWebLawnGreen | $00FC7C | #7CFC00 | |
clWebPaleGreen | $98FB98 | #98FB98 | |
clWebMediumAquamarine | $AACD66 | #66CDAA | |
clWebMediumSeaGreen | $71B33C | #3CB371 | |
clWebDarkGoldenRod | $0B86B8 | #B8860B | |
clWebDarkKhaki | $6BB7BD | #BDB76B | |
clWebDarkOliveGreen | $2F6B55 | #556B2F | |
clWebDarkgreen | $006400 | #006400 | |
clWebLimeGreen | $32CD32 | #32CD32 | |
clWebLime | $00FF00 | #00FF00 | |
clWebSpringGreen | $7FFF00 | #00FF7F | |
clWebMediumSpringGreen | $9AFA00 | #00FA9A | |
clWebDarkSeaGreen | $8FBC8F | #8FBC8F | |
clWebLightSeaGreen | $AAB220 | #20B2AA | |
clWebPaleTurquoise | $EEEEAF | #AFEEEE | |
clWebLightCyan | $FFFFE0 | #E0FFFF | |
clWebLightBlue | $E6D8AD | #ADD8E6 | |
clWebLightSkyBlue | $FACE87 | #87CEFA | |
clWebCornFlowerBlue | $ED9564 | #6495ED | |
clWebDarkBlue | $8B0000 | #00008B | |
clWebIndigo | $82004B | #4B0082 | |
clWebMediumTurquoise | $CCD148 | #48D1CC | |
clWebTurquoise | $D0E040 | #40E0D0 | |
clWebCyan | $FFFF00 | #00FFFF | |
clWebAqua | $FFFF00 | #00FFFF | |
clWebPowderBlue | $E6E0B0 | #B0E0E6 | |
clWebSkyBlue | $EBCE87 | #87CEEB | |
clWebRoyalBlue | $E16941 | #4169E1 | |
clWebMediumBlue | $CD0000 | #0000CD | |
clWebMidnightBlue | $701919 | #191970 | |
clWebDarkTurquoise | $D1CE00 | #00CED1 | |
clWebCadetBlue | $A09E5F | #5F9EA0 | |
clWebDarkCyan | $8B8B00 | #008B8B | |
clWebTeal | $808000 | #008080 | |
clWebDeepskyBlue | $FFBF00 | #00BFFF | |
clWebDodgerBlue | $FF901E | #1E90FF | |
clWebBlue | $FF0000 | #0000FF | |
clWebNavy | $800000 | #000080 | |
clWebDarkViolet | $D30094 | #9400D3 | |
clWebDarkOrchid | $CC3299 | #9932CC | |
clWebMagenta | $FF00FF | #FF00FF | |
clWebFuchsia | $FF00FF | #FF00FF | |
clWebDarkMagenta | $8B008B | #8B008B | |
clWebMediumVioletRed | $8515C7 | #C71585 | |
clWebPaleVioletRed | $9370DB | #DB7093 | |
clWebBlueViolet | $E22B8A | #8A2BE2 | |
clWebMediumOrchid | $D355BA | #BA55D3 | |
clWebMediumPurple | $DB7093 | #9370DB | |
clWebPurple | $800080 | #800080 | |
clWebDeepPink | $9314FF | #FF1493 | |
clWebLightPink | $C1B6FF | #FFB6C1 | |
clWebViolet | $EE82EE | #EE82EE | |
clWebOrchid | $D670DA | #DA70D6 | |
clWebPlum | $DDA0DD | #DDA0DD | |
clWebThistle | $D8BFD8 | #D8BFD8 | |
clWebHotPink | $B469FF | #FF69B4 | |
clWebPink | $CBC0FF | #FFC0CB | |
clWebLightSteelBlue | $DEC4B0 | #B0C4DE | |
clWebMediumSlateBlue | $EE687B | #7B68EE | |
clWebLightSlateGray | $998877 | #778899 | |
clWebWhite | $FFFFFF | #FFFFFF | |
clWebLightgrey | $D3D3D3 | #D3D3D3 | |
clWebGray | $808080 | #808080 | |
clWebSteelBlue | $B48246 | #4682B4 | |
clWebSlateBlue | $CD5A6A | #6A5ACD | |
clWebSlateGray | $908070 | #708090 | |
clWebWhiteSmoke | $F5F5F5 | #F5F5F5 | |
clWebSilver | $C0C0C0 | #C0C0C0 | |
clWebDimGray | $696969 | #696969 | |
clWebMistyRose | $E1E4FF | #FFE4E1 | |
clWebDarkSlateBlue | $8B3D48 | #483D8B | |
clWebDarkSlategray | $4F4F2F | #2F4F4F | |
clWebGainsboro | $DCDCDC | #DCDCDC | |
clWebDarkGray | $A9A9A9 | #A9A9A9 | |
clWebBlack | $000000 | #000000 |
这个表的制作过程:
第一步, 先从 Delphi 的源文件中提取并替换出下面的文本文件:
<br>clBlack=$000000<br>clMaroon=$000080<br>clGreen=$008000<br>clOlive=$008080<br>clNavy=$800000<br>clPurple=$800080<br>clTeal=$808000<br>clGray=$808080<br>clSilver=$C0C0C0<br>clRed=$0000FF<br>clLime=$00FF00<br>clYellow=$00FFFF<br>clBlue=$FF0000<br>clFuchsia=$FF00FF<br>clAqua=$FFFF00<br>clLtGray=$C0C0C0<br>clDkGray=$808080<br>clWhite=$FFFFFF<br>clMoneyGreen=$C0DCC0<br>clSkyBlue=$F0CAA6<br>clCream=$F0FBFF<br>clMedGray=$A4A0A0<br>clWebSnow=$FAFAFF<br>clWebFloralWhite=$F0FAFF<br>clWebLavenderBlush=$F5F0FF<br>clWebOldLace=$E6F5FD<br>clWebIvory=$F0FFFF<br>clWebCornSilk=$DCF8FF<br>clWebBeige=$DCF5F5<br>clWebAntiqueWhite=$D7EBFA<br>clWebWheat=$B3DEF5<br>clWebAliceBlue=$FFF8F0<br>clWebGhostWhite=$FFF8F8<br>clWebLavender=$FAE6E6<br>clWebSeashell=$EEF5FF<br>clWebLightYellow=$E0FFFF<br>clWebPapayaWhip=$D5EFFF<br>clWebNavajoWhite=$ADDEFF<br>clWebMoccasin=$B5E4FF<br>clWebBurlywood=$87B8DE<br>clWebAzure=$FFFFF0<br>clWebMintcream=$FAFFF5<br>clWebHoneydew=$F0FFF0<br>clWebLinen=$E6F0FA<br>clWebLemonChiffon=$CDFAFF<br>clWebBlanchedAlmond=$CDEBFF<br>clWebBisque=$C4E4FF<br>clWebPeachPuff=$B9DAFF<br>clWebTan=$8CB4D2<br>clWebYellow=$00FFFF<br>clWebDarkOrange=$008CFF<br>clWebRed=$0000FF<br>clWebDarkRed=$00008B<br>clWebMaroon=$000080<br>clWebIndianRed=$5C5CCD<br>clWebSalmon=$7280FA<br>clWebCoral=$507FFF<br>clWebGold=$00D7FF<br>clWebTomato=$4763FF<br>clWebCrimson=$3C14DC<br>clWebBrown=$2A2AA5<br>clWebChocolate=$1E69D2<br>clWebSandyBrown=$60A4F4<br>clWebLightSalmon=$7AA0FF<br>clWebLightCoral=$8080F0<br>clWebOrange=$00A5FF<br>clWebOrangeRed=$0045FF<br>clWebFirebrick=$2222B2<br>clWebSaddleBrown=$13458B<br>clWebSienna=$2D52A0<br>clWebPeru=$3F85CD<br>clWebDarkSalmon=$7A96E9<br>clWebRosyBrown=$8F8FBC<br>clWebPaleGoldenrod=$AAE8EE<br>clWebLightGoldenrodYellow=$D2FAFA<br>clWebOlive=$008080<br>clWebForestGreen=$228B22<br>clWebGreenYellow=$2FFFAD<br>clWebChartreuse=$00FF7F<br>clWebLightGreen=$90EE90<br>clWebAquamarine=$D4FF7F<br>clWebSeaGreen=$578B2E<br>clWebGoldenRod=$20A5DA<br>clWebKhaki=$8CE6F0<br>clWebOliveDrab=$238E6B<br>clWebGreen=$008000<br>clWebYellowGreen=$32CD9A<br>clWebLawnGreen=$00FC7C<br>clWebPaleGreen=$98FB98<br>clWebMediumAquamarine=$AACD66<br>clWebMediumSeaGreen=$71B33C<br>clWebDarkGoldenRod=$0B86B8<br>clWebDarkKhaki=$6BB7BD<br>clWebDarkOliveGreen=$2F6B55<br>clWebDarkgreen=$006400<br>clWebLimeGreen=$32CD32<br>clWebLime=$00FF00<br>clWebSpringGreen=$7FFF00<br>clWebMediumSpringGreen=$9AFA00<br>clWebDarkSeaGreen=$8FBC8F<br>clWebLightSeaGreen=$AAB220<br>clWebPaleTurquoise=$EEEEAF<br>clWebLightCyan=$FFFFE0<br>clWebLightBlue=$E6D8AD<br>clWebLightSkyBlue=$FACE87<br>clWebCornFlowerBlue=$ED9564<br>clWebDarkBlue=$8B0000<br>clWebIndigo=$82004B<br>clWebMediumTurquoise=$CCD148<br>clWebTurquoise=$D0E040<br>clWebCyan=$FFFF00<br>clWebAqua=$FFFF00<br>clWebPowderBlue=$E6E0B0<br>clWebSkyBlue=$EBCE87<br>clWebRoyalBlue=$E16941<br>clWebMediumBlue=$CD0000<br>clWebMidnightBlue=$701919<br>clWebDarkTurquoise=$D1CE00<br>clWebCadetBlue=$A09E5F<br>clWebDarkCyan=$8B8B00<br>clWebTeal=$808000<br>clWebDeepskyBlue=$FFBF00<br>clWebDodgerBlue=$FF901E<br>clWebBlue=$FF0000<br>clWebNavy=$800000<br>clWebDarkViolet=$D30094<br>clWebDarkOrchid=$CC3299<br>clWebMagenta=$FF00FF<br>clWebFuchsia=$FF00FF<br>clWebDarkMagenta=$8B008B<br>clWebMediumVioletRed=$8515C7<br>clWebPaleVioletRed=$9370DB<br>clWebBlueViolet=$E22B8A<br>clWebMediumOrchid=$D355BA<br>clWebMediumPurple=$DB7093<br>clWebPurple=$800080<br>clWebDeepPink=$9314FF<br>clWebLightPink=$C1B6FF<br>clWebViolet=$EE82EE<br>clWebOrchid=$D670DA<br>clWebPlum=$DDA0DD<br>clWebThistle=$D8BFD8<br>clWebHotPink=$B469FF<br>clWebPink=$CBC0FF<br>clWebLightSteelBlue=$DEC4B0<br>clWebMediumSlateBlue=$EE687B<br>clWebLightSlateGray=$998877<br>clWebWhite=$FFFFFF<br>clWebLightgrey=$D3D3D3<br>clWebGray=$808080<br>clWebSteelBlue=$B48246<br>clWebSlateBlue=$CD5A6A<br>clWebSlateGray=$908070<br>clWebWhiteSmoke=$F5F5F5<br>clWebSilver=$C0C0C0<br>clWebDimGray=$696969<br>clWebMistyRose=$E1E4FF<br>clWebDarkSlateBlue=$8B3D48<br>clWebDarkSlategray=$4F4F2F<br>clWebGainsboro=$DCDCDC<br>clWebDarkGray=$A9A9A9<br>clWebBlack=$000000<br>
第二步, 写了个小程序:
第三步, 添加表头表尾.
第二步, 写了个小程序:
unit Unit1;
interface
uses
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
Dialogs, StdCtrls;
type
TForm1 = class(TForm)
Button1: TButton;
procedure Button1Click(Sender: TObject);
end;
var
Form1: TForm1;
implementation
{$R *.dfm}
{这是专为这个表写的一个转换函数}
function HexColorToHtmlColor(s: string): string;
var
i: Integer;
R,G,B: Byte;
begin
i := StrToInt(s);
R := i and $FF;
G := (i shr 8) and $FF;
B := (i shr 16) and $FF;
Result := #35 + Format('%.2x%.2x%.2x',[R,G,B]);
end;
procedure TForm1.Button1Click(Sender: TObject);
var
List: TStringList;
i: Integer;
s1,s2,s3: string;
begin
List := TStringList.Create;
List.LoadFromFile('c:"temp"Delphi.txt');
for i := 0 to List.Count - 1 do
begin
s1 := List.Names[i];
s2 := List.ValueFromIndex[i];
s3 := HexColorToHtmlColor(s2);
List[i] := '<tr><td>' + s1 +
'</td><td style="background-color:' + s3 +
'"></td><td>' + s2 + '</td><td>' + s3 + '</td></tr>';
end;
List.SaveToFile('c:"temp"Html.txt');
List.Free;
end;
end.
第三步, 添加表头表尾.