Returns the most similar entry on the excel palette for a given color.
function MatchNearestColor(const Workbook: TExcelFile; const aColor: TColor; const UsedColors: BooleanArray): integer;
int MatchNearestColor(const TExcelFile Workbook, const TColor aColor, const BooleanArray UsedColors);
|
Parameters |
Description |
|
const Workbook: TExcelFile |
Excel file where you want to get the color. |
|
const aColor: TColor |
Color for which you want to find the nearest one. |
|
const UsedColors: BooleanArray |
A list of used colors. |
The color that is nearest to the one specified in aColor.
You will normally want to use TFlexCelImport.NearestColorIndex instead of this method.
If UsedColors is not nil, it will try to modify the Excel color palette to get a better match on the color, modifying among the not used colors. Note that modifying the standard palette might result on a file that is not easy to edit on Excel later, since it does not have the standard Excel colors.
|
Copyright (c) 2002-2008 TMS Software. All rights reserved.
|
|
What do you think about this topic? Send feedback!
|