Autor Beitrag
furkal
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 33



BeitragVerfasst: Do 01.05.03 09:49 
Hallo!!

Hat jemand von Euch eine Ahnung, wie ich aus rgb:longint (errechnet sich aus colortoRGB(color:tcolor); die diskreten Werte für rot, grün und blau herausziehe. So dass ich etwa mit RGB(rot:byte;gruen:byte;blau:byte) weiterarbeiten kann?

Schöne Grüße 'Furkal'
Keldorn
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 2266
Erhaltene Danke: 4

Vista
D6 Prof, D 2005 Pro, D2007 Pro, DelphiXE2 Pro
BeitragVerfasst: Do 01.05.03 09:57 
du kommst am besten, wenn du noch 5 Posts zur gleichen Frage aufmachst, damit man an 5 Stellen weiterdiskutieren kann. Das erhöht doch sehr die Übersichtlichkeit. :roll:

Du sollstest zwar grundsätzlich zu einer neuen Frage einen neuen Thread aufmachen aber nicht unbedingt im alten Thread eine Frage stellen und 5 min später nen neuen thread mit der gleichen Frage aufmachen - da sieht ja keiner mehr durch.

zu deiner Frage: schau dir GetRValue, GetGvalue,GetBvalue an.

Frank

_________________
Lükes Grundlage der Programmierung: Es wird nicht funktionieren.
(Murphy)
Motzi
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic star
Beiträge: 2931

XP Prof, Vista Business
D6, D2k5-D2k7 je Prof
BeitragVerfasst: Do 01.05.03 16:48 
Keldorn hat dir ja bereits die API-Funktionen genannt.. du kannst aber auch gleich mit TColor arbeiten und musst nicht ColorToRGB verwenden. In diesem Fall bekommst du die Farbanteile dann so:

Rot = color and $000000FF
Grün = color and $0000FF00 shr 8
Blau = color and $00FF0000 shr 16

_________________
gringo pussy cats - eef i see you i will pull your tail out by eets roots!
furkal Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 33



BeitragVerfasst: Do 01.05.03 23:54 
Die rgb-frage, schien es mir wert einen neuen thread zu eröffnen.
- wenn's allgemein eher nicht so gern gesehen ist, werd ich in zukunft dran denken.

Habe jetzt für die TExtfarbe rgb(255-r,255-g,255-b), wobei r,g,b die Komponenten der hintergrundfarbe sind und bekomme das gewünschte Ergebnis!! - :D

Schönen dank!!
Laxans
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 28



BeitragVerfasst: So 14.12.03 20:22 
wie benutz ich das jetzt???

Motzi hat folgendes geschrieben:
Keldorn hat dir ja bereits die API-Funktionen genannt.. du kannst aber auch gleich mit TColor arbeiten und musst nicht ColorToRGB verwenden. In diesem Fall bekommst du die Farbanteile dann so:

Rot = color and $000000FF
Grün = color and $0000FF00 shr 8
Blau = color and $00FF0000 shr 16