Farbbcodes

Für alles, was in den übrigen Lazarusthemen keinen Platz, aber mit Lazarus zutun hat.
Antworten
monta
Lazarusforum e. V.
Beiträge: 2809
Registriert: Sa 9. Sep 2006, 18:05
OS, Lazarus, FPC: Linux (L trunk FPC trunk)
CPU-Target: 64Bit
Wohnort: Dresden
Kontaktdaten:

Farbbcodes

Beitrag von monta »

Die Farbwerte sind ja teilweise als (negative) Integer beispielsweise bei XMLPropStorage gespeichert.

Gibt es dazu eine Übersicht, wo die einzelnen Farbwerte als Integer mit ihrer 'wörtlichen' Übersetzung stehen?

Beispielsweise:
ClBtnFace entspriche -2147483633 usw?

Soll eigentlich dazu dienen, mal schnell in der Configurationsdatei das Erscheinungsbild anzupassen, und da nimmt er scheinbar keine cl... Werte.

monta
Lazarusforum e. V.
Beiträge: 2809
Registriert: Sa 9. Sep 2006, 18:05
OS, Lazarus, FPC: Linux (L trunk FPC trunk)
CPU-Target: 64Bit
Wohnort: Dresden
Kontaktdaten:

Beitrag von monta »

ok, ich habs mal schnell erstellt, falls mal jemand die Liste braucht (unter WinXP):

Code: Alles auswählen

Die Kurzfassung:
clBlack = 0
clMaroon = 128
clGreen = 32768
clOlive = 32896
clNavy = 8388608
clPurple = 8388736
clTeal = 8421376
clGray = 8421504
clSilver = 12632256
clRed = 255
clLime = 65280
clYellow = 65535
clBlue = 16711680
clFuchsia = 16711935
clAqua = 16776960
clSilver = 12632256
clGray = 8421504
clWhite = 16777215
clCream = 15793151
clNone = 536870911
clDefault = 536870912
 
Alle:
clBlack = 0
clMaroon = 128
clGreen = 32768
clOlive = 32896
clNavy = 8388608
clPurple = 8388736
clTeal = 8421376
clGray = 8421504
clSilver = 12632256
clRed = 255
clLime = 65280
clYellow = 65535
clBlue = 16711680
clFuchsia = 16711935
clAqua = 16776960
clLtGray = 12632256
clDkGray = 8421504
clWhite = 16777215
clCream = 15793151
clNone = 536870911
clDefault = 536870912
clScrollBar = -2147483648
clBackground = -2147483647
clActiveCaption = -2147483646
clInactiveCaption = -2147483645
clMenu = -2147483644
clWindow = -2147483643
clWindowFrame = -2147483642
clMenuText = -2147483641
clWindowText = -2147483640
clCaptionText = -2147483639
clActiveBorder = -2147483638
clInactiveBorder = -2147483637
clAppWorkspace = -2147483636
clHighlight = -2147483635
clHighlightText = -2147483634
clBtnFace = -2147483633
clBtnShadow = -2147483632
clGrayText = -2147483631
clBtnText = -2147483630
clInactiveCaptionText = -2147483629
clBtnHighlight = -2147483628
cl3DDkShadow = -2147483627
cl3DLight = -2147483626
clInfoText = -2147483625
clInfoBk = -2147483624
clHotLight = -2147483622
clGradientActiveCaption = -2147483621
clGradientInactiveCaption = -2147483620
clForm = -2147483619
clEndColors = -2147483565
clColorDesktop = -2147483647
cl3DFace = -2147483633
cl3DShadow = -2147483632
cl3DHiLight = -2147483628
clBtnHiLight = -2147483628
clForeground = -1
clButton = -2
clLight = -3
clMidlight = -4
clDark = -5
clMid = -6
clText = -7
clBrightText = -8
clButtonText = -9
clBase = -10
clShadow = -12
clHighlightedText = -14
clNormalForeground = -33
clNormalButton = -34
clNormalLight = -35
clNormalMidlight = -36
clNormalDark = -37
clNormalMid = -38
clNormalText = -39
clNormalBrightText = -40
clNormalButtonText = -41
clNormalBase = -42
clNormalBackground = -43
clNormalShadow = -44
clNormalHighlight = -45
clNormalHighlightedText = -46
clDisabledForeground = -65
clDisabledButton = -66
clDisabledLight = -67
clDisabledMidlight = -68
clDisabledDark = -69
clDisabledMid = -70
clDisabledText = -71
clDisabledBrightText = -72
clDisabledButtonText = -73
clDisabledBase = -74
clDisabledBackground = -75
clDisabledShadow = -76
clDisabledHighlight = -77
clDisabledHighlightedText = -78
clActiveForeground = -97
clActiveButton = -98
clActiveLight = -99
clActiveMidlight = -100
clActiveDark = -101
clActiveMid = -102
clActiveText = -103
clActiveBrightText = -104
clActiveButtonText = -105
clActiveBase = -106
clActiveBackground = -107
clActiveShadow = -108
clActiveHighlight = -109
clActiveHighlightedText = -110
clMoneyGreen = 12639424
clSkyBlue = 15780518
clMedGray = 10789024


Gibt es diese Systemmwerte eigentlich identisch unter Linux oder tragen die Faren dort andere Bezeichner?

Christian
Beiträge: 6079
Registriert: Do 21. Sep 2006, 07:51
OS, Lazarus, FPC: iWinux (L 1.x.xy FPC 2.y.z)
CPU-Target: AVR,ARM,x86(-64)
Wohnort: Dessau
Kontaktdaten:

Beitrag von Christian »

Die sind einheitlich gibts also unter Linux genauso wir sind ja hier nicht bei Borland :p siehe Write once compile everywhere
W.m.k.A.h.e.m.F.h. -> http://www.gidf.de/

monta
Lazarusforum e. V.
Beiträge: 2809
Registriert: Sa 9. Sep 2006, 18:05
OS, Lazarus, FPC: Linux (L trunk FPC trunk)
CPU-Target: 64Bit
Wohnort: Dresden
Kontaktdaten:

Beitrag von monta »

Na dann ist ja gut. :)

waran
Beiträge: 17
Registriert: Mo 25. Dez 2006, 06:59

Beitrag von waran »

Im pinzip sind TColor einfach nur Hex-Zahlen.

Somecolor := $FF0000;

ist problemlos möglich (in dem Fall ist es Rot).
Also wie in HTML eigentlich :D

Euklid
Lazarusforum e. V.
Beiträge: 2808
Registriert: Fr 22. Sep 2006, 10:38
OS, Lazarus, FPC: Lazarus v2.0.10, FPC 3.2.0
Wohnort: Hessen
Kontaktdaten:

Beitrag von Euklid »

Ja! Die Zuweisung von Farbwerten geht durch die Funktion

[code="laz"]Somecolor:=RgbToColor(rot,gruen,blau);[/code]

Sogar noch einfacher. Rot, gruen und blau sind Werte von 0 bis 255

Viele Grüße, Euklid

Christian
Beiträge: 6079
Registriert: Do 21. Sep 2006, 07:51
OS, Lazarus, FPC: iWinux (L 1.x.xy FPC 2.y.z)
CPU-Target: AVR,ARM,x86(-64)
Wohnort: Dessau
Kontaktdaten:

Beitrag von Christian »

Somecolor := $FF0000;


das ist n html farbcode aber keine tcolor die haben nämlich 8 stellen hex glaub ich
W.m.k.A.h.e.m.F.h. -> http://www.gidf.de/

Benutzeravatar
theo
Beiträge: 10497
Registriert: Mo 11. Sep 2006, 19:01

Beitrag von theo »

Christian hat geschrieben:
Somecolor := $FF0000;


das ist n html farbcode aber keine tcolor die haben nämlich 8 stellen hex glaub ich


$FF0000 ist eine Ganzzahl-Konstante (dez:16711680). Die kann man typecasten auf TColor
a la: clBlue = TColor($FF0000);

Antworten