Recent

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

Zaher

  • Hero Member
  • *****
  • Posts: 679
    • parmaja.org
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: 3197
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: 2020
  • Former Delphi 1-7, 10.2 user
Re: colGreen and colLime are same
« Reply #2 on: December 08, 2019, 02:35:17 am »

marcov

  • Administrator
  • Hero Member
  • *
  • Posts: 11382
  • 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: 3197
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

  • Administrator
  • Hero Member
  • *
  • Posts: 11382
  • 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: 1848
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 - Lazarus 2.1/FPC 3.2 (built using fpcupdeluxe),
Linux Mint - Lazarus 2.1/FPC 3.2 (built using fpcupdeluxe)

mORMot; Zeos 8; SQLite, PostgreSQL & MariaDB; VirtualTreeView


 

TinyPortal © 2005-2018