Author |
Topic |
|
PeterPanino
933 Posts |
|
kturkay
44 Posts |
|
PeterPanino
933 Posts |
Posted - Apr 07 2021 : 17:29:01
|
Hi kturkay,
thanks for the links. Downloaded https://github.com/nglthach/mbColorLib
This seems to be a very capable library. After having added the compiler definitions for Rio and Sydney in the mxs.inc file I could compile the package in Delphi 10.4.2.
Since there is no demo project in the downloaded ZIP file I will now have to try out all the components. Nice job for the night. |
|
|
PeterPanino
933 Posts |
Posted - Apr 08 2021 : 04:28:15
|
That is a very complete COLOR-PICKER library!
But there are no explicit Color Harmony functions. |
|
|
PeterPanino
933 Posts |
Posted - Apr 08 2021 : 09:06:57
|
Does anybody know any Delphi functions to create Color Schemes from a given color? Examples:
• Complementary Color • Analogous Colors • Split-Complementary Colors • Triadic/Tetradic Colors |
|
|
PeterPanino
933 Posts |
Posted - Apr 08 2021 : 13:30:11
|
I have written a procedure that generates the 12 colors of a color wheel:
procedure TdlgMain.btnMyGenClick(Sender: TObject);
var
i: Integer;
H, S, V: Integer;
begin
ColorPalette1.Clear;
ColorToHSV(IEColorButton1.SelectedColor, H, S, V);
for i := 0 to 23 do
begin
ColorPalette1.AddColor(HSVToColor(H + (i * 30), S, V));
end;
end;
As an example, starting from the color clRed, these colors are created in a palette:
You can see that the 360° hex-cone is traversed two times, generating each time the same colors.
With this algorithm, the complementary colors are the colors vertically adjacent between the rows.
Is this algorithm correct? |
|
|
xequte
38616 Posts |
Posted - Apr 08 2021 : 15:57:47
|
Hi Peter
It looks like you are working on the assumption that Complimentary color = Hue + 180. But that does not seem to match what is described in your initial post.
Red is Hue=1, but Hue=181 is cyan, not green as recommended by the chart. Yellow is Hue=60, but Hue=260 is blue, not purple.
The reason, when I look at the color wheel you reference in your first post, is that it does not align with the HSV palette at all
Nigel Xequte Software www.imageen.com
|
|
|
PeterPanino
933 Posts |
Posted - Apr 08 2021 : 16:33:01
|
Hi Nigel,
this seems to be a misunderstanding.
You can see from the screenshot that the Hue from RED is 0:
... and that the Hue from CYAN is 180:
Here is the demo project:
attach/PeterPanino/202148163219_TestColorSchemes.zip 21.01 KB
BTW, that complementary.gif you show in your post is completely WRONG! (That color wheel obviously uses the RYB color model) Where did you get it from? That is not the Color Wheel I am referencing to.
This is a correct Color Wheel (source: Wikipedia):
I have compared the colors from my demo project (starting from clRed) with the colors of the above ColorStarWheel: They are exactly the same! |
|
|
PeterPanino
933 Posts |
Posted - Apr 09 2021 : 06:36:05
|
About the subject COMPLEMENTARY COLORS, Wikipedia ( https://en.wikipedia.org/wiki/Complementary_colors ) says (emphasis added by me):
• Modern color theory uses either the RGB additive color model or the CMY subtractive color model, and in these, the complementary pairs are red–cyan, green–magenta, and blue–yellow. • In the traditional RYB color model, the complementary color pairs are red–green, yellow–purple, and blue–orange. |
|
|
PeterPanino
933 Posts |
|
PeterPanino
933 Posts |
|
xequte
38616 Posts |
|
PeterPanino
933 Posts |
Posted - Apr 10 2021 : 07:51:25
|
Hi Nigel,
done. |
|
|
kturkay
44 Posts |
|
PeterPanino
933 Posts |
Posted - Apr 10 2021 : 16:15:44
|
Hi kturkay,
thanks! This looks very interesting! |
|
|
|
Topic |
|