summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/corelib/fpg_main.pas5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/corelib/fpg_main.pas b/src/corelib/fpg_main.pas
index 2277c764..39d767bf 100644
--- a/src/corelib/fpg_main.pas
+++ b/src/corelib/fpg_main.pas
@@ -1047,7 +1047,10 @@ end;
function fpgGetNamedColor(col: TfpgColor): TfpgColor;
begin
- Result := fpgNamedColors[col and $FF];
+ if fpgIsNamedColor(col) then
+ Result := col // nothing to do, it is already a named color
+ else
+ Result := fpgNamedColors[col and $FF];
end;
procedure fpgSetNamedColor(colorid, rgbvalue: longword);