![]() |
Re: Color mixer
Delphi-Quellcode:
F1 :cry:
var
RGB: array [0..2] of Byte; HSL1, HSL2: array [0..2] of Integer; H, S, L: Integer; begin // get values here // Max* vars are = 256 H := Round((MaxHue / ARange) * AValue) * (HSL2[0] - HSL1[0]) shr 8 + HSL1[0]; S := Round((MaxSat / ARange) * AValue) * (HSL2[1] - HSL1[1]) shr 8 + HSL1[1]; L := Round((MaxLum / ARange) * AValue) * (HSL2[2] - HSL1[2]) shr 8 + HSL1[2]; /// set color here end; SetLength(A, Round(edtSteps.Value) + 2); A[0] := Color1; A[High(A)] := Color2; N := 255 div (Round(edtSteps.Value) + 1); X := 0; Caption := IntToStr(N); for I := 1 to High(A) - 1 do begin Inc(X, N); A[I] := BlendColorsHueCW(Color1, Color2, Byte(X), 255); end; |
Alle Zeitangaben in WEZ +1. Es ist jetzt 02:54 Uhr. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
LinkBacks Enabled by vBSEO © 2011, Crawlability, Inc.
Delphi-PRAXiS (c) 2002 - 2023 by Daniel R. Wolf, 2024-2025 by Thomas Breitkreuz