Difference between revisions of "RGBTOTColor/de"
From Lazarus wiki
Jump to navigationJump to searchLine 27: | Line 27: | ||
{{AutoCategory}} | {{AutoCategory}} | ||
− | [[Category:Code | + | [[Category:Code Snippets/de]] |
[[Category:Color/de]] | [[Category:Color/de]] |
Revision as of 00:43, 30 October 2015
│
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;
...
--Olaf 11:05, 30 April 2013 (UTC)