Einzelnen Beitrag anzeigen

Benutzerbild von himitsu
himitsu
Online

Registriert seit: 11. Okt 2003
Ort: Elbflorenz
44.063 Beiträge
 
Delphi 12 Athens
 
#5

Re: Gleiche Farbwerte sind innerhalb einer Anwendung ungleic

  Alt 22. Apr 2006, 10:24
Also die Farbkonstanten sind mit Palette $00 definiert, aber was in den Bildern/der Farbpalette verwendet wird, ist 'ne andere angelegenheit.
Delphi-Quellcode:
( TColor - RGB-Color (Red, Green, Blue):
( **************************************
(
( TColorRec = Record Case Byte of
( 0: (Org: TColor);
( 1: (Red, Green, Blue, Palette: Byte); << if Palette = $00..$02
( 2: (Systemcolor: Byte; dummy: Word; Palette: Byte); << if Palette = $FF
( ...
( End;
(
( Palette = $00: most similar color from the system palette
( Palette = $01: most similar color from the acting palette
( Palette = $02: most similar color from the logical palette of the current device context
( Palette = $FF: system color
(
( Palette = $1F: no color
( Palette = $20: default color
Delphi-Quellcode:
Const cpSystemPalette = $00;
    cpActingPalette = $01;
    cpLogicalPalette = $02;
    cpNoColor = $1F;
    cpDefaultColor = $20;
    cpSystemColor = $FF;

    clScrollBar = TColor(cpSystemColor shl 24 or TColorIndex(0));
    clBackground = TColor(cpSystemColor shl 24 or TColorIndex(1));
    clActiveCaption = TColor(cpSystemColor shl 24 or TColorIndex(2));
    clInactiveCaption = TColor(cpSystemColor shl 24 or TColorIndex(3));
    clMenu = TColor(cpSystemColor shl 24 or TColorIndex(4));
    clWindow = TColor(cpSystemColor shl 24 or TColorIndex(5));
    clWindowFrame = TColor(cpSystemColor shl 24 or TColorIndex(6));
    clMenuText = TColor(cpSystemColor shl 24 or TColorIndex(7));
    clWindowText = TColor(cpSystemColor shl 24 or TColorIndex(8));
    clCaptionText = TColor(cpSystemColor shl 24 or TColorIndex(9));
    clActiveBorder = TColor(cpSystemColor shl 24 or TColorIndex(10));
    clInactiveBorder = TColor(cpSystemColor shl 24 or TColorIndex(11));
    clAppWorkSpace = TColor(cpSystemColor shl 24 or TColorIndex(12));
    clHighlight = TColor(cpSystemColor shl 24 or TColorIndex(13));
    clHighlightText = TColor(cpSystemColor shl 24 or TColorIndex(14));
    clBtnFace = TColor(cpSystemColor shl 24 or TColorIndex(15));
    clBtnShadow = TColor(cpSystemColor shl 24 or TColorIndex(16));
    clGrayText = TColor(cpSystemColor shl 24 or TColorIndex(17));
    clBtnText = TColor(cpSystemColor shl 24 or TColorIndex(18));
    clInactiveCaptionText = TColor(cpSystemColor shl 24 or TColorIndex(19));
    clBtnHighlight = TColor(cpSystemColor shl 24 or TColorIndex(20));

    cl3DDkShadow = TColor(cpSystemColor shl 24 or TColorIndex(21));
    cl3DLight = TColor(cpSystemColor shl 24 or TColorIndex(22));
    clInfoText = TColor(cpSystemColor shl 24 or TColorIndex(23));
    clInfoBk = TColor(cpSystemColor shl 24 or TColorIndex(24));

    clHotLight = TColor(cpSystemColor shl 24 or TColorIndex(26));
    clGradientActiveCaption = TColor(cpSystemColor shl 24 or TColorIndex(27));
    clGradientInactiveCaption = TColor(cpSystemColor shl 24 or TColorIndex(28));

    clMenuHighlight = TColor(cpSystemColor shl 24 or TColorIndex(29));
    clMenuBar = TColor(cpSystemColor shl 24 or TColorIndex(30));

    { No Const }
    {} _Palette_ = cpSystemPalette shl 24;

    clBlack = TColor(_Palette_ or $000000); clGray = TColor(_Palette_ or $808080);
    clLtGray = TColor(_Palette_ or $C0C0C0); clWhite = TColor(_Palette_ or $FFFFFF);

    clMaroon = TColor(_Palette_ or $000080); clRed = TColor(_Palette_ or $0000FF);
    clGreen = TColor(_Palette_ or $008000); clLime = TColor(_Palette_ or $00FF00);
    clOlive = TColor(_Palette_ or $008080); clYellow = TColor(_Palette_ or $00FFFF);
    clNavy = TColor(_Palette_ or $800000); clBlue = TColor(_Palette_ or $FF0000);
    clPurple = TColor(_Palette_ or $800080); clFuchsia = TColor(_Palette_ or $FF00FF);
    clTeal = TColor(_Palette_ or $808000); clAqua = TColor(_Palette_ or $FFFF00);

    clDkGray = clGray; // = TColor(_Palette_ or $808080);
    clSilver = clLtGray; // = TColor(_Palette_ or $C0C0C0);

    clMoneyGreen = TColor(_Palette_ or $C0DCC0);
    clSkyBlue = TColor(_Palette_ or $F0CAA6);
    clCream = TColor(_Palette_ or $F0FBFF);
    clMedGray = TColor(_Palette_ or $A4A0A0);

    clNone = TColor(cpNoColor shl 24 or $FFFFFF);
    clDefault = TColor(cpDefaultColor shl 24 or $000000);
Neuste Erkenntnis:
Seit Pos einen dritten Parameter hat,
wird PoSex im Delphi viel seltener praktiziert.
  Mit Zitat antworten Zitat