This repository has been archived on 2024-12-25. You can view files and clone it, but cannot push or open issues or pull requests.
2024-03-10 20:32:51 +03:00

24 lines
608 B
ObjectPascal

// Смешение цветов RGB
uses GraphWPF,Controls;
begin
Window.Title := 'Цвета';
Font.Size := 40;
LeftPanel(150);
var r := Slider('Красный: ',0,255,255,16);
var g := Slider('Зеленый: ',0,255,255,16);
var b := Slider('Синий: ',0,255,255,16);
Button('Выход').Click := procedure Window.Close;
var p: procedure := () begin
var c := RGB(r.Value,g.Value,b.Value);
Window.Clear(c);
DrawText(GraphWindow.ClientRect,$'R={c.R}, G={c.G}, B={c.B}');
end;
r.ValueChanged := p;
g.ValueChanged := p;
b.ValueChanged := p;
p;
end.