|
FlexCel Studio for VCL/LCL
|
Returns the most similar entry on the excel palette for a given color.
function NearestColorIndex(const aColor: TColor; const UsedColors: BooleanArray): integer; overload;
__fastcall int NearestColorIndex(const TColor aColor, const BooleanArray UsedColors);
|
Parameters |
Description |
|
const aColor: TColor |
Color we want to use. |
|
const UsedColors: BooleanArray |
If nil, this method will just return the color that is nearest to the one you specified. When not nil, FlexCel will look in the list of available colors, set one of them with the color you specified, adn then returnt that color. To get a list of used colors for the first call, use GetUsedPaletteColors. After the first call, keep using the same UsedColors structure and do not call GetUsedPaletteColors again, to avoid overwriting colors that are not yet inserted into the xls file with new ones. You can call GetUsedPaletteColors only after you added the format with AddFormat |
Most similar color on the Excel palette.
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!
|