colorwheel

Generate multi-color colorwheels


License
MIT
Install
pip install colorwheel==1.0.0

Documentation

Colorwheel is a package for generating colorwheels with different numbers of colors.

How to install this package :

pip install colorwheel

Don't forget to pip install pathlib if you don't have it installed

How to use this package :

When instantiating the class, there is a parameter side, which is responsible for the height of the picture. The default value for side is 768 and the width of the picture is proportioned so that the picture fills the screen of a 15.6 inch laptop. For other screen sizes you can instantiate the class with another value for side and also another value for the parameter screen_portion. screen_portion default value is 1.778 which is portion of width to height of a 15.6 inch laptop. For other screen sizes you should calculate the value for screen_portion yourself.

After instantiating the Colorwheel class, just execute show() method on the object to see the colorwheel. By default the colorwheel will have 12 colors but you can change the number by giving value to parameter color_number when instantiating the class. Note that only numbers in the formats below are acceptable : 3*2, 3*4, 3*8, 3*16, 3*32, ... and 12, 12*2, 12*3, 12*4, ...

Also if you want to save a picture of the colorwheel, just press 's' on your keyboard while the picture window is open.

There are some other features that come with the final picture. Like lines between colors, a small white circle in the center of colorwheel, the direction of the colors and rotation angel for the colors in the colorwheel.

For each feature there is a parameter responsible for changing or canceling that feature :

  1. Lines between colors : By default you should have lines between colors, but if you set parameter lines to False when instantiating the class then this feature will be cancelled.
  2. White circle in the center of colorwheel : If you dont like it just instantiate the class with parameter center_circle with value of False.
  3. Direction of the colors : If you want to change the direction of the colors in the colorwheel just instantiate the class with parameter reversing with value of True.
  4. Rotation angel for the colors : By default rotation parameter is 0, but if you want the colors to rotate ,then instantiate the class with parameter rotation set to a degree [0, 360].

Example

from colorwheel import ColorWheel

cw = ColorWheel() ## colorwheel with 12 colors

cw.show()

12 colored colorwheel

cw = ColorWheel(color_number=7200, lines=False, center_circle=False) ## colorwheel with 7200 colors

cw.show()

7200 colored colorwheel

Github address

github.com/aliloloee