http://FMPro.info  FileMaker Pro 関連総合ポータルサイト

Color 関数

カテゴリー : テキスト処理
計算結果のデータタイプ : 数字
対応FileMakerバージョン : 対応 7  対応 8  対応 8.5  対応 9  対応 10  対応 11  未対応 12  未対応 13  未対応 14  未対応 15
作者 : 社本修司 株式会社ジェネコム

概要

<色名>から RGB 関数の返り値を返します。

構文

Color ( 色名 )

引数

引数名タイプ備考
色名テキスト色の名前Aqua Marine

別のウィンドウで、引数の値を変更してテストすることが出来ます

Color ( "Aqua Marine" )

結果

8388564

/*
Color ( 色名 )
<色名>から RGB 関数の返り値を返します。
<色名>には、X11 color names と呼ばれる Web で利用できる英語の色名、JIS慣用色名を指定できます。
また、"#ff0000" のような 16進数で表した RGB 値を指定することもできます。
TextColor ( "テキスト" ; Color ( "色名" ) ) とすることで、RGBを意識することなく計算式中で色を扱うことができます。

Geoff Coffey氏の Color 関数 <http://www.briandunning.com/cf/2> にJIS慣用色名を追加
JIS慣用色名(269色)の RGB値は「WEB色見本 原色大辞典」<http://www.colordic.org/>を参照
*/

Let
(
    [
    C = Substitute ( Lower ( TrimAll ( 色名 ; 3 ; 3 ) ) ; [ "色" ; "" ] ; [ "いろ" ; "" ] )
    ] ;
   Case (
       Left ( C ; 1 ) = "#" ;

        // 16進数RGBの場合
       Let (
            [
            CHAR = Right ( C ; 1 ) ;
            LEN = Length ( C )
            ] ;

            ( Position ( "0123456789abcdef" ; CHAR ; 1 ; 1 ) - 1 ) +
           If (
                LEN > 2 ;
                16 * Color ( Left ( C ; LEN - 1 ) )
            )
        ) ;
    
        // 色名の場合
       Case (

        // X11 color names を基にしたWeb表示色(140色)
            C = "aliceblue" ; "15792383" ;     // AliceBlue , #F0F8FF , RGB ( 240 ; 248 ; 255 )
            C = "antiquewhite" ; "16444375" ;     // AntiqueWhite , #FAEBD7 , RGB ( 250 ; 235 ; 215 )
            C = "aqua" ; "65535" ;     // Aqua , #00FFFF , RGB ( 0 ; 255 ; 255 )
            C = "aquamarine" ; "8388564" ;     // Aquamarine , #7FFFD4 , RGB ( 127 ; 255 ; 212 )
            C = "azure" ; "15794175" ;     // Azure , #F0FFFF , RGB ( 240 ; 255 ; 255 )
            C = "beige" ; "16119260" ;     // Beige , #F5F5DC , RGB ( 245 ; 245 ; 220 )
            C = "bisque" ; "16770244" ;     // Bisque , #FFE4C4 , RGB ( 255 ; 228 ; 196 )
            C = "black" ; "0" ;     // Black , #000000 , RGB ( 0 ; 0 ; 0 )
            C = "blanchedalmond" ; "16772045" ;     // BlanchedAlmond , #FFEBCD , RGB ( 255 ; 235 ; 205 )
            C = "blue" ; "255" ;     // Blue , #0000FF , RGB ( 0 ; 0 ; 255 )
            C = "blueviolet" ; "9055202" ;     // BlueViolet , #8A2BE2 , RGB ( 138 ; 43 ; 226 )
            C = "brown" ; "10824234" ;     // Brown , #A52A2A , RGB ( 165 ; 42 ; 42 )
            C = "burlywood" ; "14596231" ;     // BurlyWood , #DEB887 , RGB ( 222 ; 184 ; 135 )
            C = "cadetblue" ; "6266528" ;     // CadetBlue , #5F9EA0 , RGB ( 95 ; 158 ; 160 )
            C = "chartreuse" ; "8388352" ;     // Chartreuse , #7FFF00 , RGB ( 127 ; 255 ; 0 )
            C = "chocolate" ; "13789470" ;     // Chocolate , #D2691E , RGB ( 210 ; 105 ; 30 )
            C = "coral" ; "16744272" ;     // Coral , #FF7F50 , RGB ( 255 ; 127 ; 80 )
            C = "cornflowerblue" ; "6591981" ;     // CornflowerBlue , #6495ED , RGB ( 100 ; 149 ; 237 )
            C = "cornsilk" ; "16775388" ;     // Cornsilk , #FFF8DC , RGB ( 255 ; 248 ; 220 )
            C = "crimson" ; "14423100" ;     // Crimson , #DC143C , RGB ( 220 ; 20 ; 60 )
            C = "cyan" ; "65535" ;     // Cyan , #00FFFF , RGB ( 0 ; 255 ; 255 )
            C = "darkblue" ; "139" ;     // DarkBlue , #00008B , RGB ( 0 ; 0 ; 139 )
            C = "darkcyan" ; "35723" ;     // DarkCyan , #008B8B , RGB ( 0 ; 139 ; 139 )
            C = "darkgoldenrod" ; "12092939" ;     // DarkGoldenrod , #B8860B , RGB ( 184 ; 134 ; 11 )
            C = "darkgray" ; "11119017" ;     // DarkGray , #A9A9A9 , RGB ( 169 ; 169 ; 169 )
            C = "darkgreen" ; "25600" ;     // DarkGreen , #006400 , RGB ( 0 ; 100 ; 0 )
            C = "darkkhaki" ; "12433259" ;     // DarkKhaki , #BDB76B , RGB ( 189 ; 183 ; 107 )
            C = "darkmagenta" ; "9109643" ;     // DarkMagenta , #8B008B , RGB ( 139 ; 0 ; 139 )
            C = "darkolivegreen" ; "5597999" ;     // DarkOliveGreen , #556B2F , RGB ( 85 ; 107 ; 47 )
            C = "darkorange" ; "16747520" ;     // DarkOrange , #FF8C00 , RGB ( 255 ; 140 ; 0 )
            C = "darkorchid" ; "10040012" ;     // DarkOrchid , #9932CC , RGB ( 153 ; 50 ; 204 )
            C = "darkred" ; "9109504" ;     // DarkRed , #8B0000 , RGB ( 139 ; 0 ; 0 )
            C = "darksalmon" ; "15308410" ;     // DarkSalmon , #E9967A , RGB ( 233 ; 150 ; 122 )
            C = "darkseagreen" ; "9419919" ;     // DarkSeaGreen , #8FBC8F , RGB ( 143 ; 188 ; 143 )
            C = "darkslateblue" ; "4734347" ;     // DarkSlateBlue , #483D8B , RGB ( 72 ; 61 ; 139 )
            C = "darkslategray" ; "3100495" ;     // DarkSlateGray , #2F4F4F , RGB ( 47 ; 79 ; 79 )
            C = "darkturquoise" ; "52945" ;     // DarkTurquoise , #00CED1 , RGB ( 0 ; 206 ; 209 )
            C = "darkviolet" ; "9699539" ;     // DarkViolet , #9400D3 , RGB ( 148 ; 0 ; 211 )
            C = "deeppink" ; "16716947" ;     // DeepPink , #FF1493 , RGB ( 255 ; 20 ; 147 )
            C = "deepskyblue" ; "49151" ;     // DeepSkyBlue , #00BFFF , RGB ( 0 ; 191 ; 255 )
            C = "dimgray" ; "6908265" ;     // DimGray , #696969 , RGB ( 105 ; 105 ; 105 )
            C = "dodgerblue" ; "2003199" ;     // DodgerBlue , #1E90FF , RGB ( 30 ; 144 ; 255 )
            C = "firebrick" ; "11674146" ;     // FireBrick , #B22222 , RGB ( 178 ; 34 ; 34 )
            C = "floralwhite" ; "16775920" ;     // FloralWhite , #FFFAF0 , RGB ( 255 ; 250 ; 240 )
            C = "forestgreen" ; "2263842" ;     // ForestGreen , #228B22 , RGB ( 34 ; 139 ; 34 )
            C = "fuchsia" ; "16711935" ;     // Fuchsia , #FF00FF , RGB ( 255 ; 0 ; 255 )
            C = "gainsboro" ; "14474460" ;     // Gainsboro , #DCDCDC , RGB ( 220 ; 220 ; 220 )
            C = "ghostwhite" ; "16316671" ;     // GhostWhite , #F8F8FF , RGB ( 248 ; 248 ; 255 )
            C = "gold" ; "16766720" ;     // Gold , #FFD700 , RGB ( 255 ; 215 ; 0 )
            C = "goldenrod" ; "14329120" ;     // Goldenrod , #DAA520 , RGB ( 218 ; 165 ; 32 )
            C = "gray" ; "8421504" ;     // Gray , #808080 , RGB ( 128 ; 128 ; 128 )
            C = "green" ; "32768" ;     // Green , #008000 , RGB ( 0 ; 128 ; 0 )
            C = "greenyellow" ; "11403055" ;     // GreenYellow , #ADFF2F , RGB ( 173 ; 255 ; 47 )
            C = "honeydew" ; "15794160" ;     // Honeydew , #F0FFF0 , RGB ( 240 ; 255 ; 240 )
            C = "hotpink" ; "16738740" ;     // HotPink , #FF69B4 , RGB ( 255 ; 105 ; 180 )
            C = "indianred" ; "13458524" ;     // IndianRed , #CD5C5C , RGB ( 205 ; 92 ; 92 )
            C = "indigo" ; "4915330" ;     // Indigo , #4B0082 , RGB ( 75 ; 0 ; 130 )
            C = "ivory" ; "16777200" ;     // Ivory , #FFFFF0 , RGB ( 255 ; 255 ; 240 )
            C = "khaki" ; "15787660" ;     // Khaki , #F0E68C , RGB ( 240 ; 230 ; 140 )
            C = "lavender" ; "15132410" ;     // Lavender , #E6E6FA , RGB ( 230 ; 230 ; 250 )
            C = "lavenderblush" ; "16773365" ;     // LavenderBlush , #FFF0F5 , RGB ( 255 ; 240 ; 245 )
            C = "lawngreen" ; "8190976" ;     // LawnGreen , #7CFC00 , RGB ( 124 ; 252 ; 0 )
            C = "lemonchiffon" ; "16775885" ;     // LemonChiffon , #FFFACD , RGB ( 255 ; 250 ; 205 )
            C = "lightblue" ; "11393254" ;     // LightBlue , #ADD8E6 , RGB ( 173 ; 216 ; 230 )
            C = "lightcoral" ; "15761536" ;     // LightCoral , #F08080 , RGB ( 240 ; 128 ; 128 )
            C = "lightcyan" ; "14745599" ;     // LightCyan , #E0FFFF , RGB ( 224 ; 255 ; 255 )
            C = "lightgoldenrodyellow" ; "16448210" ;     // LightGoldenrodYellow , #FAFAD2 , RGB ( 250 ; 250 ; 210 )
            C = "lightgreen" ; "9498256" ;     // LightGreen , #90EE90 , RGB ( 144 ; 238 ; 144 )
            C = "lightgrey" ; "13882323" ;     // LightGrey , #D3D3D3 , RGB ( 211 ; 211 ; 211 )
            C = "lightpink" ; "16758465" ;     // LightPink , #FFB6C1 , RGB ( 255 ; 182 ; 193 )
            C = "lightsalmon" ; "16752762" ;     // LightSalmon , #FFA07A , RGB ( 255 ; 160 ; 122 )
            C = "lightseagreen" ; "2142890" ;     // LightSeaGreen , #20B2AA , RGB ( 32 ; 178 ; 170 )
            C = "lightskyblue" ; "8900346" ;     // LightSkyBlue , #87CEFA , RGB ( 135 ; 206 ; 250 )
            C = "lightslategray" ; "7833753" ;     // LightSlateGray , #778899 , RGB ( 119 ; 136 ; 153 )
            C = "lightsteelblue" ; "11584734" ;     // LightSteelBlue , #B0C4DE , RGB ( 176 ; 196 ; 222 )
            C = "lightyellow" ; "16777184" ;     // LightYellow , #FFFFE0 , RGB ( 255 ; 255 ; 224 )
            C = "lime" ; "65280" ;     // Lime , #00FF00 , RGB ( 0 ; 255 ; 0 )
            C = "limegreen" ; "3329330" ;     // LimeGreen , #32CD32 , RGB ( 50 ; 205 ; 50 )
            C = "linen" ; "16445670" ;     // Linen , #FAF0E6 , RGB ( 250 ; 240 ; 230 )
            C = "magenta" ; "16711935" ;     // Magenta , #FF00FF , RGB ( 255 ; 0 ; 255 )
            C = "maroon" ; "8388608" ;     // Maroon , #800000 , RGB ( 128 ; 0 ; 0 )
            C = "mediumaquamarine" ; "6737322" ;     // MediumAquamarine , #66CDAA , RGB ( 102 ; 205 ; 170 )
            C = "mediumblue" ; "205" ;     // MediumBlue , #0000CD , RGB ( 0 ; 0 ; 205 )
            C = "mediumorchid" ; "12211667" ;     // MediumOrchid , #BA55D3 , RGB ( 186 ; 85 ; 211 )
            C = "mediumpurple" ; "9662683" ;     // MediumPurple , #9370DB , RGB ( 147 ; 112 ; 219 )
            C = "mediumseagreen" ; "3978097" ;     // MediumSeaGreen , #3CB371 , RGB ( 60 ; 179 ; 113 )
            C = "mediumslateblue" ; "8087790" ;     // MediumSlateBlue , #7B68EE , RGB ( 123 ; 104 ; 238 )
            C = "mediumspringgreen" ; "64154" ;     // MediumSpringGreen , #00FA9A , RGB ( 0 ; 250 ; 154 )
            C = "mediumturquoise" ; "4772300" ;     // MediumTurquoise , #48D1CC , RGB ( 72 ; 209 ; 204 )
            C = "mediumvioletred" ; "13047173" ;     // MediumVioletRed , #C71585 , RGB ( 199 ; 21 ; 133 )
            C = "midnightblue" ; "1644912" ;     // MidnightBlue , #191970 , RGB ( 25 ; 25 ; 112 )
            C = "mintcream" ; "16121850" ;     // MintCream , #F5FFFA , RGB ( 245 ; 255 ; 250 )
            C = "mistyrose" ; "16770273" ;     // MistyRose , #FFE4E1 , RGB ( 255 ; 228 ; 225 )
            C = "moccasin" ; "16770229" ;     // Moccasin , #FFE4B5 , RGB ( 255 ; 228 ; 181 )
            C = "navajowhite" ; "16768685" ;     // NavajoWhite , #FFDEAD , RGB ( 255 ; 222 ; 173 )
            C = "navy" ; "128" ;     // Navy , #000080 , RGB ( 0 ; 0 ; 128 )
            C = "oldlace" ; "16643558" ;     // OldLace , #FDF5E6 , RGB ( 253 ; 245 ; 230 )
            C = "olive" ; "8421376" ;     // Olive , #808000 , RGB ( 128 ; 128 ; 0 )
            C = "olivedrab" ; "7048739" ;     // OliveDrab , #6B8E23 , RGB ( 107 ; 142 ; 35 )
            C = "orange" ; "16753920" ;     // Orange , #FFA500 , RGB ( 255 ; 165 ; 0 )
            C = "orangered" ; "16729344" ;     // OrangeRed , #FF4500 , RGB ( 255 ; 69 ; 0 )
            C = "orchid" ; "14315734" ;     // Orchid , #DA70D6 , RGB ( 218 ; 112 ; 214 )
            C = "palegoldenrod" ; "15657130" ;     // PaleGoldenrod , #EEE8AA , RGB ( 238 ; 232 ; 170 )
            C = "palegreen" ; "10025880" ;     // PaleGreen , #98FB98 , RGB ( 152 ; 251 ; 152 )
            C = "paleturquoise" ; "11529966" ;     // PaleTurquoise , #AFEEEE , RGB ( 175 ; 238 ; 238 )
            C = "palevioletred" ; "14381203" ;     // PaleVioletRed , #DB7093 , RGB ( 219 ; 112 ; 147 )
            C = "papayawhip" ; "16773077" ;     // PapayaWhip , #FFEFD5 , RGB ( 255 ; 239 ; 213 )
            C = "peachpuff" ; "16767673" ;     // PeachPuff , #FFDAB9 , RGB ( 255 ; 218 ; 185 )
            C = "peru" ; "13468991" ;     // Peru , #CD853F , RGB ( 205 ; 133 ; 63 )
            C = "pink" ; "16761035" ;     // Pink , #FFC0CB , RGB ( 255 ; 192 ; 203 )
            C = "plum" ; "14524637" ;     // Plum , #DDA0DD , RGB ( 221 ; 160 ; 221 )
            C = "powderblue" ; "11591910" ;     // PowderBlue , #B0E0E6 , RGB ( 176 ; 224 ; 230 )
            C = "purple" ; "8388736" ;     // Purple , #800080 , RGB ( 128 ; 0 ; 128 )
            C = "red" ; "16711680" ;     // Red , #FF0000 , RGB ( 255 ; 0 ; 0 )
            C = "rosybrown" ; "12357519" ;     // RosyBrown , #BC8F8F , RGB ( 188 ; 143 ; 143 )
            C = "royalblue" ; "4286945" ;     // RoyalBlue , #4169E1 , RGB ( 65 ; 105 ; 225 )
            C = "saddlebrown" ; "9127187" ;     // SaddleBrown , #8B4513 , RGB ( 139 ; 69 ; 19 )
            C = "salmon" ; "16416882" ;     // Salmon , #FA8072 , RGB ( 250 ; 128 ; 114 )
            C = "sandybrown" ; "16032864" ;     // SandyBrown , #F4A460 , RGB ( 244 ; 164 ; 96 )
            C = "seagreen" ; "3050327" ;     // SeaGreen , #2E8B57 , RGB ( 46 ; 139 ; 87 )
            C = "seashell" ; "16774638" ;     // Seashell , #FFF5EE , RGB ( 255 ; 245 ; 238 )
            C = "sienna" ; "10506797" ;     // Sienna , #A0522D , RGB ( 160 ; 82 ; 45 )
            C = "silver" ; "12632256" ;     // Silver , #C0C0C0 , RGB ( 192 ; 192 ; 192 )
            C = "skyblue" ; "8900331" ;     // SkyBlue , #87CEEB , RGB ( 135 ; 206 ; 235 )
            C = "slateblue" ; "6970061" ;     // SlateBlue , #6A5ACD , RGB ( 106 ; 90 ; 205 )
            C = "slategray" ; "7372944" ;     // SlateGray , #708090 , RGB ( 112 ; 128 ; 144 )
            C = "snow" ; "16775930" ;     // Snow , #FFFAFA , RGB ( 255 ; 250 ; 250 )
            C = "springgreen" ; "65407" ;     // SpringGreen , #00FF7F , RGB ( 0 ; 255 ; 127 )
            C = "steelblue" ; "4620980" ;     // SteelBlue , #4682B4 , RGB ( 70 ; 130 ; 180 )
            C = "tan" ; "13808780" ;     // Tan , #D2B48C , RGB ( 210 ; 180 ; 140 )
            C = "teal" ; "32896" ;     // Teal , #008080 , RGB ( 0 ; 128 ; 128 )
            C = "thistle" ; "14204888" ;     // Thistle , #D8BFD8 , RGB ( 216 ; 191 ; 216 )
            C = "tomato" ; "16737095" ;     // Tomato , #FF6347 , RGB ( 255 ; 99 ; 71 )
            C = "turquoise" ; "4251856" ;     // Turquoise , #40E0D0 , RGB ( 64 ; 224 ; 208 )
            C = "violet" ; "15631086" ;     // Violet , #EE82EE , RGB ( 238 ; 130 ; 238 )
            C = "wheat" ; "16113331" ;     // Wheat , #F5DEB3 , RGB ( 245 ; 222 ; 179 )
            C = "white" ; "16777215" ;     // White , #FFFFFF , RGB ( 255 ; 255 ; 255 )
            C = "whitesmoke" ; "16119285" ;     // WhiteSmoke , #F5F5F5 , RGB ( 245 ; 245 ; 245 )
            C = "yellow" ; "16776960" ;     // Yellow , #FFFF00 , RGB ( 255 ; 255 ; 0 )
            C = "yellowgreen" ; "10145074" ;     // YellowGreen , #9ACD32 , RGB ( 154 ; 205 ; 50 )
                
        // JIS慣用色名(269色)
            C = "鴇" or C = "とき" ; "16036802" ;    
            C = "躑躅" or C = "つつじ" ; "15291029" ;    
            C = "桜" or C = "さくら" ; "16708852" ;    
            C = "薔薇" or C = "ばら" ; "15291499" ;    
            C = "韓紅" or C = "からくれない" ; "15291492" ;    
            C = "珊瑚" or C = "さんご" ; "16101802" ;    
            C = "紅梅" or C = "こうばい" ; "15900833" ;    
            C = "桃" or C = "もも" ; "15765913" ;    
            C = "紅" or C = "べに" ; "14090298" ;    
            C = "紅赤" or C = "べにあか" ; "14234431" ;    
            C = "臙脂" or C = "えんじ" ; "12140615" ;    
            C = "蘇芳" or C = "すおう" ; "10370367" ;    
            C = "茜" or C = "あかね" ; "12003374" ;    
            C = "赤" or C = "あか" ; "15073331" ;    
            C = "朱" or C = "しゅ" ; "15425793" ;    
            C = "紅樺" or C = "べにかば" ; "12277064" ;    
            C = "紅緋" or C = "べにひ" ; "15218985" ;    
            C = "鉛丹" or C = "えんたん" ; "15494481" ;    
            C = "紅海老茶" or C = "べにえびちゃ" ; "10958902" ;    
            C = "鳶" or C = "とび" ; "9783359" ;    
            C = "小豆" or C = "あずき" ; "9851213" ;    
            C = "弁柄" or C = "べんがら" ; "9383444" ;    
            C = "海老茶" or C = "えびちゃ" ; "7814192" ;    
            C = "金赤" or C = "きんあか" ; "15357190" ;    
            C = "赤茶" or C = "あかちゃ" ; "12277045" ;    
            C = "赤錆" or C = "あかさび" ; "9057049" ;    
            C = "黄丹" or C = "おうに" ; "15628616" ;    
            C = "赤橙" or C = "あかだいだい" ; "15357190" ;    
            C = "柿" or C = "かき" ; "15559997" ;    
            C = "肉桂" or C = "にっけい" ; "14514774" ;    
            C = "樺" or C = "かば" ; "13459004" ;    
            C = "煉瓦" or C = "れんが" ; "11883059" ;    
            C = "錆" or C = "さび" ; "7091492" ;    
            C = "檜皮" or C = "ひわだ" ; "9850934" ;    
            C = "栗" or C = "くり" ; "7745287" ;    
            C = "黄赤" or C = "きあか" ; "15493120" ;    
            C = "代赭" or C = "たいしゃ" ; "12277024" ;    
            C = "駱駝" or C = "らくだ" ; "12548430" ;    
            C = "黄茶" or C = "きちゃ" ; "14777140" ;    
            C = "肌" or C = "はだ" ; "16573124" ;    
            C = "橙" or C = "だいだい" ; "15628288" ;    
            C = "灰茶" or C = "はいちゃ" ; "9986620" ;    
            C = "茶" or C = "ちゃ" ; "9850946" ;    
            C = "焦茶" or C = "こげちゃ" ; "7293758" ;    
            C = "柑子" or C = "こうじ" ; "16166217" ;    
            C = "杏" or C = "あんず" ; "16234871" ;    
            C = "蜜柑" or C = "みかん" ; "15762176" ;    
            C = "褐" or C = "かっしょく" ; "9059072" ;    
            C = "土" or C = "つち" ; "12351036" ;    
            C = "小麦" or C = "こむぎ" ; "14982753" ;    
            C = "琥珀" or C = "こはく" ; "12548154" ;    
            C = "金茶" or C = "きんちゃ" ; "15964160" ;    
            C = "卵" or C = "たまご" ; "16569717" ;    
            C = "山吹" or C = "やまぶき" ; "16299264" ;    
            C = "黄土" or C = "おうど" ; "12816707" ;    
            C = "朽葉" or C = "くちば" ; "9532231" ;    
            C = "向日葵" or C = "ひまわり" ; "16566272" ;    
            C = "鬱金" or C = "うこん" ; "16432916" ;    
            C = "砂" or C = "すな" ; "14472114" ;    
            C = "芥子" or C = "からし" ; "13676364" ;    
            C = "黄" or C = "き" ; "16767232" ;    
            C = "蒲公英" or C = "たんぽぽ" ; "16767232" ;    
            C = "鶯茶" or C = "うぐいすちゃ" ; "7429151" ;    
            C = "中黄" or C = "ちゅうき" ; "16771584" ;    
            C = "刈安" or C = "かりやす" ; "16115051" ;    
            C = "黄檗" or C = "きはだ" ; "16708195" ;    
            C = "海松" or C = "みる" ; "7499072" ;    
            C = "鶸" or C = "ひわ" ; "14143290" ;    
            C = "鶯" or C = "うぐいす" ; "9604150" ;    
            C = "抹茶" or C = "まっちゃ" ; "12961130" ;    
            C = "黄緑" or C = "きみどり" ; "12112384" ;    
            C = "苔" or C = "こけ" ; "6914587" ;    
            C = "若草" or C = "わかくさ" ; "12834853" ;    
            C = "萌黄" or C = "もえぎ" ; "11194195" ;    
            C = "草" or C = "くさ" ; "8097090" ;    
            C = "若葉" or C = "わかば" ; "12177547" ;    
            C = "松葉" or C = "まつば" ; "8624988" ;    
            C = "白緑" or C = "びゃくろく" ; "14084554" ;    
            C = "緑" or C = "みどり" ; "4109168" ;    
            C = "常磐" or C = "ときわ" ; "31555" ;    
            C = "緑青" or C = "ろくしょう" ; "4687966" ;    
            C = "千歳緑" or C = "ちとせみどり" ; "3237701" ;    
            C = "深緑" or C = "ふかみどり" ; "21806" ;    
            C = "萌葱" or C = "もえぎ" ; "28244" ;    
            C = "若竹" or C = "わかたけ" ; "6864525" ;    
            C = "青磁" or C = "せいじ" ; "8306341" ;    
            C = "青竹" or C = "あおたけ" ; "8306347" ;    
            C = "鉄" or C = "てつ" ; "21059" ;    
            C = "青緑" or C = "あおみどり" ; "42135" ;    
            C = "錆浅葱" or C = "さびあさぎ" ; "6066833" ;    
            C = "水浅葱" or C = "みずあさぎ" ; "8432553" ;    
            C = "新橋" or C = "しんばし" ; "5880262" ;    
            C = "浅葱" or C = "あさぎ" ; "41903" ;    
            C = "白群" or C = "びゃくぐん" ; "8637650" ;    
            C = "納戸" or C = "なんど" ; "34969" ;    
            C = "瓶覗" or C = "かめのぞき" ; "10672093" ;    
            C = "水" or C = "みず" ; "12378856" ;    
            C = "藍鼠" or C = "あいねず" ; "7111821" ;    
            C = "空" or C = "そら" ; "10541295" ;    
            C = "青" or C = "あお" ; "38361" ;    
            C = "藍" or C = "あい" ; "1465987" ;    
            C = "濃藍" or C = "こいあい" ; "992080" ;    
            C = "勿忘草" or C = "わすれなぐさ" ; "9028587" ;    
            C = "露草" or C = "つゆくさ" ; "3711451" ;    
            C = "縹" or C = "はなだ" ; "2593475" ;    
            C = "紺青" or C = "こんじょう" ; "1650528" ;    
            C = "瑠璃" or C = "るり" ; "1986722" ;    
            C = "瑠璃紺" or C = "るりこん" ; "1655950" ;    
            C = "紺" or C = "こん" ; "2243184" ;    
            C = "杜若" or C = "かきつばた" ; "4088493" ;    
            C = "勝" or C = "かち" ; "5065825" ;    
            C = "群青" or C = "ぐんじょう" ; "5008563" ;    
            C = "鉄紺" or C = "てつこん" ; "1513547" ;    
            C = "藤納戸" or C = "ふじなんど" ; "7367850" ;    
            C = "桔梗" or C = "ききょう" ; "5657762" ;    
            C = "紺藍" or C = "こんあい" ; "4868238" ;    
            C = "藤" or C = "ふじ" ; "12303582" ;    
            C = "藤紫" or C = "ふじむらさき" ; "10853066" ;    
            C = "青紫" or C = "あおむらさき" ; "6768024" ;    
            C = "菫" or C = "すみれ" ; "7362723" ;    
            C = "鳩羽" or C = "はとば" ; "9799068" ;    
            C = "菖蒲" or C = "しょうぶ" ; "6766998" ;    
            C = "江戸紫" or C = "えどむらさき" ; "7623577" ;    
            C = "紫" or C = "むらさき" ; "8931480" ;    
            C = "古代紫" or C = "こだいむらさき" ; "9001866" ;    
            C = "茄子紺" or C = "なすこん" ; "8538240" ;    
            C = "紫紺" or C = "しこん" ; "4591172" ;    
            C = "菖蒲" or C = "あやめ" ; "13401777" ;    
            C = "牡丹" or C = "ぼたん" ; "15163550" ;    
            C = "赤紫" or C = "あかむらさき" ; "15429285" ;    
            C = "白" or C = "しろ" ; "16777215" ;    
            C = "胡粉" or C = "ごふん" ; "16777212" ;    
            C = "生成り" or C = "きなり" ; "16513781" ;    
            C = "象牙" or C = "ぞうげ" ; "16315622" ;    
            C = "銀鼠" or C = "ぎんねず" ; "11513776" ;    
            C = "茶鼠" or C = "ちゃねずみ" ; "11116179" ;    
            C = "鼠" or C = "ねずみ" ; "9737365" ;    
            C = "利休鼠" or C = "りきゅうねずみ" ; "8949374" ;    
            C = "鉛" or C = "なまり" ; "8092797" ;    
            C = "灰" or C = "はい" ; "8224125" ;    
            C = "煤竹" or C = "すすたけ" ; "7295308" ;    
            C = "黒茶" or C = "くろちゃ" ; "5781538" ;    
            C = "墨" or C = "すみ" ; "5855319" ;    
            C = "黒" or C = "くろ" ; "2829099" ;    
            C = "鉄黒" or C = "てつぐろ" ; "2628116" ;    
            C = "金" or C = "きん" ; "16766720" ;    
            C = "銀" or C = "ぎん" ; "12632256" ;    
            C = "ローズレッド" or C = "rosered" ; "15360398" ;    
            C = "ローズピンク" or C = "rosepink" ; "15834279" ;    
            C = "コチニールレッド" or C = "cochinealred" ; "13118549" ;    
            C = "ルビーレッド" or C = "rubyred" ; "15152482" ;    
            C = "ワインレッド" or C = "winered" ; "11746908" ;    
            C = "バーガンディー" or C = "burgundy" ; "7087925" ;    
            C = "オールドローズ" or C = "oldrose" ; "14848921" ;    
            C = "ローズ" or C = "rose" ; "15291492" ;    
            C = "ストロベリー" or C = "strawberry" ; "15152482" ;    
            C = "コーラルレッド" or C = "coralred" ; "15697277" ;    
            C = "ピンク" ; "16102066" ;    
            C = "ボルドー" or C = "bordeaux" ; "7087917" ;    
            C = "ベビーピンク" or C = "babypink" ; "16641508" ;    
            C = "ポピーレッド" or C = "poppyred" ; "15357264" ;    
            C = "シグナルレッド" or C = "signalred" ; "15218749" ;    
            C = "カーマイン" or C = "carmine" ; "14090293" ;    
            C = "レッド" ; "15357264" ;    
            C = "トマトレッド" or C = "tomatored" ; "15357257" ;    
            C = "マルーン" ; "6953239" ;    
            C = "バーミリオン" or C = "vermilion" ; "15357242" ;    
            C = "スカーレット" or C = "scarlet" ; "15357234" ;    
            C = "テラコッタ" or C = "terracotta" ; "12413014" ;    
            C = "サーモンピンク" or C = "salmonpink" ; "15967884" ;    
            C = "シェルピンク" or C = "shellpink" ; "16505544" ;    
            C = "ネールピンク" or C = "nailpink" ; "16573654" ;    
            C = "チャイニーズレッド" or C = "chinesered" ; "15560006" ;    
            C = "キャロットオレンジ" or C = "carrotorange" ; "15559989" ;    
            C = "バーントシェンナ" or C = "burntsienna" ; "12277045" ;    
            C = "チョコレート" ; "7091492" ;    
            C = "ココアブラウン" or C = "cocoabrown" ; "9986142" ;    
            C = "ピーチ" or C = "peach" ; "16505013" ;    
            C = "ローシェンナ" or C = "rawsienna" ; "14777140" ;    
            C = "オレンジ" ; "15628288" ;    
            C = "ブラウン" ; "9397586" ;    
            C = "アプリコット" or C = "apricot" ; "16234871" ;    
            C = "タン" ; "12548158" ;    
            C = "マンダリンオレンジ" or C = "mandarinorange" ; "15964189" ;    
            C = "コルク" or C = "cork" ; "12884586" ;    
            C = "エクルベージュ" or C = "ecrubeige" ; "16180684" ;    
            C = "ゴールデンイエロー" or C = "goldenyellow" ; "16166484" ;    
            C = "マリーゴールド" or C = "marigold" ; "15964160" ;    
            C = "バフ" or C = "buff" ; "13282417" ;    
            C = "アンバー" or C = "amber" ; "12749131" ;    
            C = "ブロンズ" or C = "bronze" ; "11299621" ;    
            C = "ベージュ" ; "15654067" ;    
            C = "イエローオーカー" or C = "yellowocher" ; "12883759" ;    
            C = "バーントアンバー" or C = "burntumber" ; "7296054" ;    
            C = "セピア" or C = "sepia" ; "6434072" ;    
            C = "カーキー" ; "12951642" ;    
            C = "ブロンド" or C = "blond" ; "15914378" ;    
            C = "ネープルスイエロー" or C = "naplesyellow" ; "16634716" ;    
            C = "レグホーン" or C = "leghorn" ; "16771497" ;    
            C = "ローアンバー" or C = "rawumber" ; "8807977" ;    
            C = "クロムイエロー" or C = "chromeyellow" ; "16566272" ;    
            C = "イエロー" ; "16768000" ;    
            C = "クリームイエロー" or C = "creamyellow" ; "16774072" ;    
            C = "ジョンブリアン" or C = "jaunebrillant" ; "16768000" ;    
            C = "カナリヤ" or C = "canaryyellow" ; "16774242" ;    
            C = "オリーブドラブ" ; "6707738" ;    
            C = "オリーブ" ; "7496716" ;    
            C = "レモンイエロー" or C = "lemonyellow" ; "16773970" ;    
            C = "オリーブグリーン" or C = "olivegreen" ; "6251815" ;    
            C = "シャトルーズグリーン" or C = "chartreusegreen" ; "14279527" ;    
            C = "リーフグリーン" or C = "leafgreen" ; "10469965" ;    
            C = "グラスグリーン" or C = "grassgreen" ; "8097090" ;    
            C = "アイビーグリーン" or C = "ivygreen" ; "5737021" ;    
            C = "アップルグリーン" or C = "applegreen" ; "10998413" ;    
            C = "ミントグリーン" or C = "mintgreen" ; "9030039" ;    
            C = "グリーン" ; "43360" ;    
            C = "コバルトグリーン" or C = "cobaltgreen" ; "3978106" ;    
            C = "エメラルドグリーン" or C = "emeraldgreen" ; "43368" ;    
            C = "マラカイトグリーン" or C = "malachitegreen" ; "38996" ;    
            C = "ボトルグリーン" or C = "bottlegreen" ; "19749" ;    
            C = "フォレストグリーン" ; "2657382" ;    
            C = "ビリジアン" or C = "viridian" ; "34906" ;    
            C = "ビリヤードグリーン" or C = "billiardgreen" ; "23618" ;    
            C = "シーグリーン" ; "44183" ;    
            C = "ピーコックグリーン" or C = "peacockgreen" ; "42135" ;    
            C = "ナイルブルー" or C = "nileblue" ; "2929837" ;    
            C = "ピーコックブルー" or C = "peacockblue" ; "40607" ;    
            C = "ターコイズブルー" or C = "turquoiseblue" ; "45004" ;    
            C = "マリンブルー" or C = "marineblue" ; "26760" ;    
            C = "ホリゾンブルー" or C = "horizonblue" ; "10606822" ;    
            C = "シアン" ; "41449" ;    
            C = "スカイブルー" ; "10541295" ;    
            C = "セルリアンブルー" or C = "ceruleanblue" ; "36279" ;    
            C = "ベビーブルー" or C = "babyblue" ; "12313329" ;    
            C = "サックスブルー" or C = "saxeblue" ; "4295561" ;    
            C = "ブルー" ; "30146" ;    
            C = "コバルトブルー" or C = "cobaltblue" ; "26807" ;    
            C = "アイアンブルー" or C = "ironblue" ; "1650528" ;    
            C = "プルシャンブルー" or C = "prussianblue" ; "1650528" ;    
            C = "ミッドナイトブルー" ; "7747" ;    
            C = "ヒヤシンス" or C = "hyacinth" ; "7117778" ;    
            C = "ネービーブルー" or C = "navyblue" ; "2109269" ;    
            C = "ウルトラマリンブルー" or C = "ultramarineblue" ; "4674466" ;    
            C = "オリエンタルブルー" or C = "orientalblue" ; "2509213" ;    
            C = "ウイスタリア" or C = "wistaria" ; "9278408" ;    
            C = "パンジー" or C = "pansy" ; "5063576" ;    
            C = "ヘリオトロープ" or C = "heliotrope" ; "9468342" ;    
            C = "バイオレット" ; "5915800" ;    
            C = "ラベンダー" ; "13285593" ;    
            C = "モーブ" or C = "mauve" ; "9526691" ;    
            C = "ライラック" or C = "lilac" ; "13744858" ;    
            C = "オーキッド" ; "14265037" ;    
            C = "パープル" ; "10187440" ;    
            C = "マゼンタ" ; "14942335" ;    
            C = "チェリーピンク" or C = "cherrypink" ; "15429280" ;    
            C = "ホワイト" ; "16777215" ;    
            C = "スノーホワイト" or C = "snowwhite" ; "16449023" ;    
            C = "アイボリー" ; "16315622" ;    
            C = "スカイグレイ" or C = "skygrey" ; "13357267" ;    
            C = "パールグレイ" or C = "pearlgrey" ; "13224388" ;    
            C = "シルバーグレイ" or C = "silvergrey" ; "11513776" ;    
            C = "アッシュグレイ" or C = "ashgrey" ; "10461342" ;    
            C = "ローズグレイ" or C = "rosegrey" ; "10325639" ;    
            C = "グレイ" or C = "grey" ; "8224125" ;    
            C = "スチールグレイ" or C = "steelgrey" ; "7564657" ;    
            C = "スレートグレイ" or C = "slategrey" ; "6447203" ;    
            C = "チャコールグレイ" or C = "charcoalgrey" ; "5129546" ;    
            C = "ランプブラック" or C = "lampblack" ; "2364430" ;    
            C = "ブラック" ; "0" ;    

        // 色名が該当しない場合
            0
        )
    )

エンコードは Unicode (UTF-8)、改行タイプは LF (Unix) 形式のテキストとして保存します。
テキストエディタで正常に開かない場合は、エンコードを指定してファイルを開くようにしてください。

詳細説明

<色名>から RGB 関数の返り値を返します。
<色名>には、X11 color names と呼ばれる Web で利用できる英語の色名、JIS慣用色名を指定できます。
また、"#ff0000" のような 16進数で表した RGB 値を指定することもできます。
TextColor ( "テキスト" ; Color ( "色名" ) ) とすることで、RGBを意識することなく計算式中で色を扱うことができます。

Geoff Coffey氏の Color 関数 <http://www.briandunning.com/cf/2> にJIS慣用色名を追加
JIS慣用色名(269色)の RGB値は「WEB色見本 原色大辞典」<http://www.colordic.org/>を参照

この関数が使用する他のカスタム関数

この関数を使用する他のカスタム関数

注意:ここで紹介されているカスタム関数をご自分のシステムに組み込んだ場合に発生した問題についてはFMPro.infoは責任を負いません。

Copyright © 2004-2009 FMPro.info All Rights Reserved.