Recent

Author Topic: colGreen and colLime are same  (Read 773 times)

Zaher

  • Hero Member
  • *****
  • Posts: 600
    • parmaja.com
colGreen and colLime are same
« 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?

winni

  • Hero Member
  • *****
  • Posts: 1817
Re: colGreen and colLime are same
« Reply #1 on: December 07, 2019, 10:09:50 pm »
Hi!

Definitly this is an error.

With  TColor the values are

clGreen   = $008000;
clLime  = $00FF00;


Winni

trev

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 960
  • Former Delphi 1-7, 10.2 User
Re: colGreen and colLime are same
« Reply #2 on: December 08, 2019, 02:35:17 am »
o Lazarus v2.1.0 r63871, FPC v3.3.1 r46876, macOS 10.14.6 (with sup update), Xcode 11.3.1
o Lazarus v2.1.0 r61574, FPC v3.3.1 r42318, FreeBSD 12.1 amd64 (VMware Fusion VM)
o FPC 3.0.4, FreeBSD 12.2-STABLE r365646 amd64
o Lazarus v2.1.0 r61574, FPC v3.0.4, Ubuntu 18.04 (Parallels VM)

marcov

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 8734
  • FPC developer.
Re: colGreen and colLime are same
« Reply #3 on: December 08, 2019, 04:04:51 pm »
Note that System.uitypes also has the "web" color values in FPC 3.2+

winni

  • Hero Member
  • *****
  • Posts: 1817
Re: colGreen and colLime are same
« Reply #4 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.

marcov

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 8734
  • FPC developer.
Re: colGreen and colLime are same
« Reply #5 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)
« Last Edit: December 08, 2019, 05:44:24 pm by marcov »

JD

  • Hero Member
  • *****
  • Posts: 1793
Re: colGreen and colLime are same
« Reply #6 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.
Windows (10, 7) - Lazarus 2.1/FPC 3.2, Delphi

Indy 10.6 series; mORMot; Zeos 7.3; SQLite, Firebird, PostgreSQL & MariaDB; VirtualTreeView 5.5.3 R1


 

TinyPortal © 2005-2018