![]() |
|
|
#2
|
||||
|
||||
|
Код:
function Color2Word(AColor: TColor): Word;
begin
Result:=((GetRValue(AColor) and $f8) shl 8) or
((GetGValue(AColor) and $fc) shl 3) or
((GetBValue(AColor) and $f8) shr 3);
end;Код:
var W: Word; BH, BL: Byte; begin W:=Color2Word($aa55aa); BH:=HIBYTE(W); BL:=LOBYTE(W); end; и пиши в порт BH и BL в нужном порядке. |