ImageEn for Delphi and C++ Builder ImageEn for Delphi and C++ Builder
ImageEn Forum
Profile    Join    Active Topics    Forum FAQ    Search this forumSearch
Forum membership is Free!  Click Join to sign-up
Username:
Password:
Save Password
Forgot your Password?

 All Forums
 ImageEn Library for Delphi, C++ and .Net
 ImageEn and IEvolution Support Forum
 Color Harmonies, Color Wheel?
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic  

PeterPanino

487 Posts

Posted - Apr 07 2021 :  11:32:38  Show Profile  Reply
Does ImageEn have functions for creating COLOR HARMONIES or a COLOR WHEEL? (E.g. Complementary Colors, Triadic Colors, etc.)

You can find a simple introduction to Color Harmonies here:

https://www.kickshout.com/xcreating_color_harmonies.html

kturkay

44 Posts

Posted - Apr 07 2021 :  13:34:26  Show Profile  Reply
as far as I know mbcolorlib is best since 90s.
intro: https://wiki.freepascal.org/mbColorLib
downloable at:
https://github.com/nglthach/mbColorLib
https://github.com/RRUZ/Delphi-IDE-Colorizer/tree/master/Common/mbColorLib2.0.2
Go to Top of Page

PeterPanino

487 Posts

Posted - Apr 07 2021 :  17:29:01  Show Profile  Reply
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.
Go to Top of Page

PeterPanino

487 Posts

Posted - Apr 08 2021 :  04:28:15  Show Profile  Reply
That is a very complete COLOR-PICKER library!

But there are no explicit Color Harmony functions.
Go to Top of Page

PeterPanino

487 Posts

Posted - Apr 08 2021 :  09:06:57  Show Profile  Reply
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
Go to Top of Page

PeterPanino

487 Posts

Posted - Apr 08 2021 :  13:30:11  Show Profile  Reply
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?
Go to Top of Page

xequte

5965 Posts

Posted - Apr 08 2021 :  15:57:47  Show Profile  Reply
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
Go to Top of Page

PeterPanino

487 Posts

Posted - Apr 08 2021 :  16:33:01  Show Profile  Reply
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!
Go to Top of Page

PeterPanino

487 Posts

Posted - Apr 09 2021 :  06:36:05  Show Profile  Reply
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.
Go to Top of Page

PeterPanino

487 Posts

Posted - Apr 09 2021 :  08:44:00  Show Profile  Reply
Here is version 2 of my Color Wheel Colors demo project:

attach/PeterPanino/20214984144_TestColorSchemesVersion2.zip
21.65 KB



Constructive criticism and suggestions, please!
Go to Top of Page

PeterPanino

487 Posts

Posted - Apr 09 2021 :  16:16:36  Show Profile  Reply
Here is version 3 of my Color Wheel Colors demo project:

attach/PeterPanino/202149161455_TestColorSchemesVersion3.zip
22.9 KB

Go to Top of Page

xequte

5965 Posts

Posted - Apr 10 2021 :  01:15:53  Show Profile  Reply
Hi Peter

Please post the completed demo to:

https://www.imageen.com/ieforum/topic.asp?TOPIC_ID=1446

Nigel
Xequte Software
www.imageen.com
Go to Top of Page

PeterPanino

487 Posts

Posted - Apr 10 2021 :  07:51:25  Show Profile  Reply
Hi Nigel,

done.
Go to Top of Page

kturkay

44 Posts

Posted - Apr 10 2021 :  11:34:36  Show Profile  Reply
Found some interesting color wheel library. you maybe check it out.
https://github.com/jackdp/IGDIPlusMod#screenshots
Go to Top of Page

PeterPanino

487 Posts

Posted - Apr 10 2021 :  16:15:44  Show Profile  Reply
Hi kturkay,

thanks! This looks very interesting!
Go to Top of Page
  Previous Topic Topic Next Topic  
 New Topic  Reply to Topic
 Printer Friendly
Jump To: