![]() |
Re: Color mixer
Liste der Anhänge anzeigen (Anzahl: 1)
Hi, thanks!
Float point version working, but: first element in result is first input color, then steps-1 are real steps. Why? Second int version is making black-white gradient, why? |
AW: Color mixer
There is a small error in the float-version: If you want 3 steps, you need a delta of 0.5 (0->0.5->1.0), so Delta should be 1/(Steps-1);
Delphi-Quellcode:
For question #2 I leave it up to you to find the error yourself (I found it in 5 secs).
Delta := 1/ (Steps-1);
MixRatio := 0; For i:=0 To Steps-1 do begin ColorArray[i] := MixColors(Color1, color2, MixRatio); MixRatio := MixRatio + Delta End; |
Re: Color mixer
Thanks, I tried it too, but I forgot about ( and ) :-D
And what about BW gradient from int version? |
AW: Re: Color mixer
Zitat:
Zitat:
|
Re: Color mixer
Liste der Anhänge anzeigen (Anzahl: 1)
Guys, how to do something similar, but with color wheel, mean not only 2 colors gradient, but N colors beetwen 2 input colors?
|
AW: Color mixer
Are you lazy? Blend Color1->Color2, then Color2->Color3 etc.
|
Re: Color mixer
I don't understand you, what I need to blend with?
|
AW: Color mixer
He means that you simply need to string pairwise blended colors together. That's the common way of doing it, and most probably also the by far easiest, especially if you have gradients for two colors already implemented (since it's the same thing, just done a few times in a row).
|
Re: Color mixer
When I'll blend red and magenta (above image) I'll get RGB(255, 0, 127), this color isn't in example output. So, I still don't understand what I need to blend? :(
|
AW: Color mixer
Ah! You don't want to blend with multiple preset colors in between, but using a different color model I suppose! The above looks like the blending was done in HSV or HSL space. (Don't know if right- or left-handed hue, but that should be simple enough to try out.) So instead of blending using RGB, just do it in HSV/HSL. That should get you pretty close to the above result.
|
Alle Zeitangaben in WEZ +1. Es ist jetzt 05:39 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