RGBTOTColor/de

From Free Pascal wiki
Revision as of 14:14, 25 February 2020 by Trev (talk | contribs) (Fixed syntax highlighting; removed categories included in template)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigationJump to search

Deutsch (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.

uses
  Graphics, ...;

...

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

...