tcolor

delphi TColor format Negative

依然范特西╮ 提交于 2020-11-29 09:14:12
问题 hopefully an easy question, but I could not find an answer. I am using Delphi TColor and some color values are negative. Is this documented? I need to do some color conversions, for example, to RGB. for example: Label.Color=-16777188; //light bluish Thanks 回答1: The negative values are not actual RGB colours, but Windows system colours, which are variable. For instance, the following are actual RGB colours: clRed = $000000FF; {00BBGGRR} clBlue = $00FF0000; clWhite = $00FFFFFF; clBlack =

delphi TColor format Negative

梦想的初衷 提交于 2020-11-29 09:13:17
问题 hopefully an easy question, but I could not find an answer. I am using Delphi TColor and some color values are negative. Is this documented? I need to do some color conversions, for example, to RGB. for example: Label.Color=-16777188; //light bluish Thanks 回答1: The negative values are not actual RGB colours, but Windows system colours, which are variable. For instance, the following are actual RGB colours: clRed = $000000FF; {00BBGGRR} clBlue = $00FF0000; clWhite = $00FFFFFF; clBlack =

delphi TColor format Negative

本小妞迷上赌 提交于 2020-11-29 09:10:01
问题 hopefully an easy question, but I could not find an answer. I am using Delphi TColor and some color values are negative. Is this documented? I need to do some color conversions, for example, to RGB. for example: Label.Color=-16777188; //light bluish Thanks 回答1: The negative values are not actual RGB colours, but Windows system colours, which are variable. For instance, the following are actual RGB colours: clRed = $000000FF; {00BBGGRR} clBlue = $00FF0000; clWhite = $00FFFFFF; clBlack =

Converting Inno Setup WizardForm.Color to RGB

╄→尐↘猪︶ㄣ 提交于 2019-12-01 04:11:07
问题 If I try this: [Setup] AppName=MyApp AppVerName=MyApp DefaultDirName={pf}\MyApp DefaultGroupName=MyApp OutputDir=. [Code] function ColorToRGBstring(Color: TColor): string; var R,G,B : Integer; begin R := Color and $ff; G := (Color and $ff00) shr 8; B := (Color and $ff0000) shr 16; result := 'red:' + inttostr(r) + ' green:' + inttostr(g) + ' blue:' + inttostr(b); end; procedure InitializeWizard(); begin MsgBox(ColorToRGBstring(WizardForm.Color),mbConfirmation, MB_OK); end; I get: red:15 green