Lazarus

Free Pascal => General => Topic started by: Zaher on December 07, 2019, 09:58:38 pm

Title: colGreen and colLime are same
Post by: Zaher on December 07, 2019, 09:58:38 pm
colGreen and colLime are same in file
fpc\3.3\src\packages\fcl-image\src\fpcolors.inc

Code: Pascal  [Select][+][-]
  1. colGreen      : TFPColor = (Red: $0000; Green: $ffff; Blue: $0000; Alpha: alphaOpaque);
  2. colLime       : TFPColor = (Red: $0000; Green: $ffff; Blue: $0000; Alpha: alphaOpaque);
  3.  

Isnt it bug?
Title: Re: colGreen and colLime are same
Post by: winni on December 07, 2019, 10:09:50 pm
Hi!

Definitly this is an error.

With  TColor the values are

clGreen   = $008000;
clLime  = $00FF00;


Winni
Title: Re: colGreen and colLime are same
Post by: trev on December 08, 2019, 02:35:17 am
Add a bug: http://bugs.freepascal.org/set_project.php?project_id=6
Title: Re: colGreen and colLime are same
Post by: marcov on December 08, 2019, 04:04:51 pm
Note that System.uitypes also has the "web" color values in FPC 3.2+
Title: Re: colGreen and colLime are same
Post by: winni on December 08, 2019, 04:27:36 pm
Note that System.uitypes also has the "web" color values in FPC 3.2+

High time! They were developed in the 80s by Netscape. Then organized and named by X11.
And introduced in CSS 3 around 2000.
Title: Re: colGreen and colLime are same
Post by: marcov on December 08, 2019, 04:44:38 pm
Note that System.uitypes also has the "web" color values in FPC 3.2+

High time! They were developed in the 80s by Netscape. Then organized and named by X11.
And introduced in CSS 3 around 2000.

There are at least 3 instances of the web colors in FPC+Lazarus, but nearly always local to a pacakge. This a historical  problem caused by Delphi, because the color values orignally were part of  units graphics which is already LCL/VCL.

UITYpes is a later extension to extract those color values out of the LCL on a sufficiently low (*) level that the rest of packages can use it. I hope in time all color tables will disappear or be replaced with references to it.

(*) rtl-objpas which has low package dependencies (only RTL)
Title: Re: colGreen and colLime are same
Post by: JD on December 08, 2019, 04:50:54 pm
Note that System.uitypes also has the "web" color values in FPC 3.2+

Wonderful! I wasn't aware of that.
Title: Re: colGreen and colLime are same
Post by: Zaher on December 08, 2019, 07:40:10 pm
I posted bug
https://bugs.freepascal.org/view.php?id=36407
TinyPortal © 2005-2018