Difference between revisions of "RGBTOTColor/de"
From Lazarus wiki
Jump to navigationJump to searchm (Fixed syntax highlighting; removed categories included in template) |
|||
Line 1: | Line 1: | ||
{{RGBTOTColor}} | {{RGBTOTColor}} | ||
− | + | ||
− | Zurück zur Seite [[code examples/de|Code Beispiele]]. | + | |
− | + | Zurück zur Seite [[code examples/de|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. | + | Wandelt RGB-Farbwerte in den Datentyp TColor um. |
− | Die minimalen Werte von RGB sind 0, 0, 0. Das Ergebnis ist die Farbe Schwarz. | + | |
− | <syntaxhighlight> | + | 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. | ||
+ | |||
+ | <syntaxhighlight lang=pascal> | ||
uses | uses | ||
Graphics, ...; | Graphics, ...; | ||
Line 21: | Line 25: | ||
</syntaxhighlight> | </syntaxhighlight> | ||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− |
Latest revision as of 14:14, 25 February 2020
│
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;
...