如何在Delphi中创建材料设计颜色托盘

如何在Delphi中创建材料设计颜色托盘,delphi,material-design,tcolor,Delphi,Material Design,Tcolor,我希望在delphi中实现材质设计调色板 但我不知道如何生成一个类似上图的调色板 如何为给定颜色生成从100到700的比例 TMaterialColor = class constructor Create(Color: TColor); property _100: Tcolor read f_100; property _200: Tcolor read f_200; property _300: Tcolor read f_300; property _400: Tcolor read f

我希望在delphi中实现材质设计调色板

但我不知道如何生成一个类似上图的调色板

如何为给定颜色生成从100到700的比例

TMaterialColor = class
constructor Create(Color: TColor);
property _100: Tcolor read f_100;
property _200: Tcolor read f_200;
property _300: Tcolor read f_300;
property _400: Tcolor read f_400;
property _500: Tcolor read f_500;
property _600: Tcolor read f_100;
property _700: Tcolor read f_700;  {Shift + Ctrl  + C to generate code snippet}
end
implementation
constructor TMaterialColor.Create;
begin
f_100 := ? ;
f_200 := ? ;
f_300 := ? ;
f_400 := ? ;
f_500 := ? ;
f_600 := ? ;
f_700 := ? ;
end;

这是一个相当广泛的问题:它涉及到自定义控件创建、GDI绘图(或等效)和RGB/HSV转换。。。原材料颜色是手工挑选的,没有公式。你可以在这里找到精确的值,你也可以尝试找到一些近似颜色的公式,但很难说它的效果如何。该图表似乎使用亮度作为变量。尝试在目标颜色和白色之间插值。在目标颜色和白色之间插值无法解决此问题,因为我无法评估颜色与白色的距离。如果你知道一个算法来计算700水平(100%,看图片)的任何颜色,然后与我分享,我们将获得成功的步骤托盘。thks