Sign in Join
Wiki copytemporary

RGBTOTColor/de

Zurück zur Seite Code Beispiele.

Wandelt RGB-Farbwerte in den Datentyp TColor um.

Die maximalen Werte von RGB sind 255, 255, 255. Das Ergebnis ist die Farbe Weiss.

Die minimalen Werte von RGB sind 0, 0, 0. Das Ergebnis ist die Farbe Schwarz.

pascal
uses
  Graphics, ...;

...

function funRGBToTColor(bytRot, bytGruen, bytBlau: byte): TColor;
begin
  Result := bytBlau shl 16 or bytGruen shl 8 or bytRot;
end; 

...

From the Free Pascal wiki, page "RGBTOTColor/de", as it stood on 2020-02-25 after a change by Trev, out of the wiki's dump of 2024-05-26. Copyright stays with the author who wrote it, according to the old wiki's Licensing page. If you have concerns about this material, message the admin.

Revision 1, last changed by WikiArchive .

Talk about this page

Nobody has opened a bench for this page yet. Sign in to open one.