1、Color.FromArgb(120,243,244,247)
先将F3,F4,F7转化为十进制数,再调用以上方法。
2、把F3 F4 F7转成10进制
然后用 Color.FromArgb
3、Color yourColor = Color.FromName("#F3F4F7");
4、比较笨一点的办法:
string a="#F3F4F7";
new System.Drawing.Color.fromArgb(
System.int8.parse(a.substring(1,2),System.Globalization.NumberStyles.AllowHexSpecifier);
System.int8.parse(a.substring(3,2),System.Globalization.NumberStyles.AllowHexSpecifier);
System.int8.parse(a.substring(5,2),System.Globalization.NumberStyles.AllowHexSpecifier);
);
5、Color color =Color.FromArgb(0xf3,0xf4,0xf7);
6、Public ForeColor As System.Drawing.Color = ColorTranslator.FromHtml("#F3F4F7")
7、System.Drawing.ColorConverter cc=new System.Drawing.ColorConverter();
return (System.Drawing.Color)cc.ConvertFromString(sHex);
******************************************************************************************************
aliceblue | antiquewhite | aqua | aquamarine |
azure | beige | bisque | black |
blanchedalmond | blue | blueviolet | brown |
burlywood | cadetblue | chartreuse | chocolate |
coral | cornflowerblue | cornsilk | crimson |
cyan | darkblue | darkcyan | darkgoldenrod |
darkgray | darkgreen | darkkhaki | darkmagenta |
darkolivegreen | darkorange | darkorchid | darkred |
darksalmon | darkseagreen | darkslateblue | darkslategray |
darkturquoise | darkviolet | deeppink | deepskyblue |
dimgray | dodgerblue | firebrick | floralwhite |
forestgreen | fuchsia | gainsboro | ghostwhite |
gold | goldenrod | gray | green |
greenyellow | honeydew | hotpink | indianred |
indigo | ivory | khaki | lavender |
lavenderblush | lawngreen | lemonchiffon | lightblue |
lightcoral | lightcyan | lightgoldenrodyellow | lightgreen |
lightgrey | lightpink | lightsalmon | lightseagreen |
lightskyblue | lightslategray | lightsteelblue | lightyellow |
lime | limegreen | linen | magenta |
maroon | mediumaquamarine | mediumblue | mediumorchid |
mediumpurple | mediumseagreen | mediumslateblue | mediumspringgreen |
mediumturquoise | mediumvioletred | midnightblue | mintcream |
mistyrose | moccasin | navajowhite | navy |
oldlace | olive | olivedrab | orange |
orangered | orchid | palegoldenrod | palegreen |
paleturquoise | palevioletred | papayawhip | peachpuff |
peru | pink | plum | powderblue |
purple | red | rosybrown | royalblue |
saddlebrown | salmon | sandybrown | seagreen |
seashell | sienna | silver | skyblue |
slateblue | slategray | snow | springgreen |
steelblue | tan | teal | thistle |
tomato | turquoise | violet | wheat |
white | whitesmoke | yellow | yellowgreen |