2017-08-29 118 views

回答

0

最好看的地方是matplotlib代碼。我找到了GitHub repository並搜索了它「RdYlGn」。在結果的屈指可數,將文件lib/matplotlib/_cm.py,它包含以下內容:

_RdYlGn_data = (
    (0.6470588235294118 , 0.0     , 0.14901960784313725), 
    (0.84313725490196079, 0.18823529411764706 , 0.15294117647058825), 
    (0.95686274509803926, 0.42745098039215684 , 0.2627450980392157), 
    (0.99215686274509807, 0.68235294117647061 , 0.38039215686274508), 
    (0.99607843137254903, 0.8784313725490196 , 0.54509803921568623), 
    (1.0    , 1.0     , 0.74901960784313726), 
    (0.85098039215686272, 0.93725490196078431 , 0.54509803921568623), 
    (0.65098039215686276, 0.85098039215686272 , 0.41568627450980394), 
    (0.4    , 0.74117647058823533 , 0.38823529411764707), 
    (0.10196078431372549, 0.59607843137254901 , 0.31372549019607843), 
    (0.0    , 0.40784313725490196 , 0.21568627450980393) 
    ) 

這看起來像RGB數據......在拍攝第一和最後一個點和規範化通常的8位(換句話說,將每個值乘以255),開始點和結束點看起來是(165,0,38)和(0,104,55)。事實上,在鏈接的頁面上使用顏色選擇器可以提供完全相同的值。