この特定の問題について素晴らしい説明をしてくれた AndASM に感謝します。Win32::OLE
ライブラリを使用してWord文書を読み取るPerlプログラムを書いています。私の目標は、ドキュメントを別の形式で出力することでしたが、これらのインデックス付きの値に出くわしたとき、私は非常に困っていました. 正しい方向に導かれた後、これらのインデックスのハッシュ ルックアップを Perl で構築することになりました。16 進文字列から、役に立たないと思われる他のすべてのもの (&H00
バイトなど) を削除し、このハッシュ マップを介して供給されたときに RGB 値を返す検索文字列を作成しました。
my %indexedColors = (
"ff0000" => [0,0,0],
"dcffff" => [255,255,255],
"dcf2ff" => [242,242,242],
"dcd9ff" => [217,217,217],
"dcbfff" => [191,191,191],
"dca6ff" => [166,166,166],
"dc80ff" => [128,128,128],
"ddffff" => [0,0,0],
"ddff80" => [127,127,127],
"ddffa6" => [89,89,89],
"ddffbf" => [64,64,64],
"ddffd9" => [38,38,38],
"ddfff2" => [13,13,13],
"deffff" => [238,236,225],
"dee6ff" => [221,217,195],
"debfff" => [196,188,150],
"de80ff" => [148,138,84],
"de40ff" => [74,68,42],
"de1aff" => [29,27,17],
"dfffff" => [31,73,125],
"dfff33" => [198,217,241],
"dfff66" => [141,179,226],
"dfff99" => [84,141,212],
"dfbfff" => [23,54,93],
"df80ff" => [15,36,62],
"d4ffff" => [79,129,189],
"d4ff33" => [219,229,241],
"d4ff66" => [184,204,228],
"d4ff99" => [149,179,215],
"d4bfff" => [54,95,145],
"d480ff" => [36,64,97],
"d5ffff" => [192,80,77],
"d5ff33" => [242,219,219],
"d5ff66" => [229,184,183],
"d5ff99" => [217,149,148],
"d5bfff" => [148,54,52],
"d580ff" => [99,36,35],
"d6ffff" => [155,187,89],
"d6ff33" => [221,217,195],
"d6ff66" => [214,227,188],
"d6ff99" => [194,214,155],
"d6bfff" => [118,146,60],
"d680ff" => [79,98,40],
"d7ffff" => [128,100,162],
"d7ff33" => [229,223,236],
"d7ff66" => [204,192,217],
"d7ff99" => [178,161,199],
"d7bfff" => [95,73,122],
"d780ff" => [64,49,82],
"d8ffff" => [75,172,198],
"d8ff33" => [218,238,243],
"d8ff66" => [182,221,232],
"d8ff99" => [146,205,220],
"d8bfff" => [49,132,155],
"d880ff" => [33,88,104],
"d9ffff" => [247,150,70],
"d9ff33" => [253,233,217],
"d9ff66" => [251,212,180],
"d9ff99" => [250,191,143],
"d9bfff" => [227,108,10],
"d980ff" => [152,72,6],
);
Microsoft の下位互換性を深く掘り下げる必要がないように願っていますが、念のためです。