Color Picker C1



Latest version

Released:

  1. You press the System Print Screen key or Win + Shift + S keys to capture a screen image to the clipboard. And click the Clipboard button on the main window of Free Color Picker. The image will be loaded and you can pick color from any point of the image. We strongly suggest you pick color from screen in.
  2. ' type the Imports directive for the namespace Imports C1.Win.C1Ribbon Private Sub Form1Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load Dim ColorPicker As RibbonColorPicker = New RibbonColorPicker ' add a color picker to the group RibbonGroup1.Items.Add(ColorPicker) ' add the FontColor image to your Resources folder ' set the image for the color picker ColorPicker.SmallImage = Properties.Resources.FontColor ' set the theme color for the color picker.

converts and manipulates various color representation (HSL, RVB, web, X11, ...)

Use the online image color picker above to select a color and get the HTML Color Code of this pixel. Also you get the HEX color code value, RGB value and HSV value. You can put a picture url in the textbox below or upload your own image. (for example an screenshot of your desktop). Or use an website url, you will see a thumbnail on the right side. Click the first field to open the color picker and slide to select your desired hue (such as red, violet, or blue). Drag the dot right and left to adjust saturation or up and down to adjust value. If you know the hexadecimal, RGB, or CMYK values for your base color enter them in the fields.

Project description

Converts and manipulates common color representation (RGB, HSL, web, …)

Feature

  • Damn simple and pythonic way to manipulate color representation (seeexamples below)
  • Full conversion between RGB, HSL, 6-digit hex, 3-digit hex, human color
  • One object (Color) or bunch of single purpose function (rgb2hex,hsl2rgb …)
  • web format that use the smallest representation between6-digit (e.g. #fa3b2c), 3-digit (e.g. #fbb), fully spelledcolor (e.g. white), following W3C color naming for compatibleCSS or HTML color specifications.
  • smooth intuitive color scale generation choosing N color gradients.
  • can pick colors for you to identify objects of your application.

Installation

You don’t need to download the GIT version of the code as colour isavailable on the PyPI. So you should be able to run:

If you have downloaded the GIT sources, then you could add the colour.pydirectly to one of your site-packages (thanks to a symlink). Or installthe current version via traditional:

And if you don’t have the GIT sources but would like to get the latestmaster or branch from github, you could also:

Or even select a specific revision (branch/tag/commit):

Usage

To get complete demo of each function, please read the source code which isheavily documented and provide a lot of examples in doctest format.

Here is a reduced sample of a common usage scenario:

Instantiation

Let’s create blue color:

Please note that all of these are equivalent examples to create the red color:

Reading values

Several representations are accessible:

And their different parts are also independently accessible, as the differentamount of red, blue, green, in the RGB format:

Or the hue, saturation and luminance of the HSL representation:

A note on the .hex property, it’ll return the smallest valid valuewhen possible. If you are only interested by the long value, use.hex_l:

Modifying color objects

All of these properties are read/write, so let’s add some red to this color:

We might want to de-saturate this color:

And of course, the string conversion will give the web representation which ishuman, or 3-digit, or 6-digit hex representation depending which is usable:

Ranges of colors

You can get some color scale of variation between two Color objects quiteeasily. Here, is the color scale of the rainbow between red and blue:

Or the different amount of gray between black and white:

If you have to create graphical representation with color scalebetween red and green (‘lime’ color is full green):

Notice how naturally, the yellow is displayed in human format and inthe middle of the scale. And that the quite unusual (but compatible)‘chartreuse’ color specification has been used in place of thehexadecimal representation.

Color comparison

Sane default

Color comparison is a vast subject. However, it might seem quite straightforward foryou. Colour uses a configurable default way of comparing color that might suityour needs:

The default comparison algorithm focuses only on the “web” representation which isequivalent to comparing the long hex representation (e.g. #FF0000) or to be morespecific, it is equivalent to compare the amount of red, green, and blue compositionof the RGB representation, each of these value being quantized to a 256 value scale.

This default comparison is a practical and convenient way to measure the actualcolor equivalence on your screen, or in your video card memory.

But this comparison wouldn’t make the difference between a black red, and ablack blue, which both are black:

Customization

But, this is not the sole way to compare two colors. As I’m quite lazy, I’m providingyou a way to customize it to your needs. Thus:

As you might have already guessed, the sane default is RGB_equivalence, so:

Here’s how you could implement your unique comparison function:

Note: When comparing 2 colors, only the equality function of the firstcolor will be used. Thus:

But reverse operation is not equivalent !:

Equality to non-Colour objects

As a side note, whatever your custom equality function is, it won’t beused if you compare to anything else than a Colour instance:

Note that these instances would compare as equal to any other color:

But on another non-Colour object:

Actually, Colour instances will, politely enough, leavethe other side of the equality have a chance to decide of the output,(by executing its own __eq__), so:

And inequality (using __ne__) are also polite:

Picking arbitrary color for a python object

Basic Usage

Sometimes, you just want to pick a color for an object in your applicationoften to visually identify this object. Thus, the picked color should be thesame for same objects, and different for different object:

Of course, although there’s a tiny probability that different strings yield thesame color, most of the time, different inputs will produce different colors.

Advanced Usage

You can customize your color picking algorithm by providing a picker. Apicker is a callable that takes an object, and returns something that canbe instantiated as a color by Color:

You might want to use a particular picker, but enforce how the picker willidentify two object as the same (or not). So there’s a pick_key attributethat is provided and defaults as equivalent of hash method and if hash isnot supported by your object, it’ll default to the str of your object saltedwith the class name.

Thus:

Please make sure your object is hashable or “stringable” before using theRGB_color_picker picking mechanism or provide another color picker. Nearlyall python object are hashable by default so this shouldn’t be an issue (e.g.instances of object and subclasses are hashable).

Neither hash nor str are perfect solution. So feel free to usepick_key at Color instantiation time to set your way to identifyobjects, for instance:

When choosing a pick key, you should closely consider if you want your colorto be consistent between runs (this is NOT the case with the last example),or consistent with the content of your object if it is a mutable object.

Default value of pick_key and picker ensures that the same color willbe attributed to same object between different run on different computer formost python object.

Color factory

As you might have noticed, there are few attributes that you might want to seeattached to all of your colors as equality for equality comparison support,or picker, pick_key to configure your object color picker.

You can create a customized Color factory thanks to the make_color_factory:

All color created thanks to CustomColor class instead of the default onewould get the specified attributes by default:

Of course, these are always instances of Color class:

Equality was changed from normal defaults, so:

This because the default equivalence of Color was set toHSL_equivalence.

Contributing

Any suggestion or issue is welcome. Push request are very welcome,please check out the guidelines.

Push Request Guidelines

You can send any code. I’ll look at it and will integrate it myself inthe code base and leave you as the author. This process can take time andit’ll take less time if you follow the following guidelines:

  • check your code with PEP8 or pylint. Try to stick to 80 columns wide.
  • separate your commits per smallest concern.
  • each commit should pass the tests (to allow easy bisect)
  • each functionality/bugfix commit should contain the code, tests,and doc.
  • prior minor commit with typographic or code cosmetic changes arevery welcome. These should be tagged in their commit summary with!minor.
  • the commit message should follow gitchangelog rules (check the gitlog to get examples)
  • if the commit fixes an issue or finished the implementation of afeature, please mention it in the summary.

If you have some questions about guidelines which is not answered here,please check the current git log, you might find previous commit thatwould show you how to deal with your issue.

License

Copyright (c) 2012-2017 Valentin Lab.

Color Picker C1

Licensed under the BSD License.

Changelog

0.1.4 (2017-04-19)

Fix

  • rgb2hsl would produce invalid hsl triplet when red, blue, greencomponent would be all very close to 1.0. (fixes #30) [ValentinLab]

    Typically, saturation would shoot out of range 0.0..1.0. That could thenlead to exceptions being casts afterwards when trying to reconvert thisHSL triplet to RGB values.

0.1.3 (2017-04-08)

Fix

  • Unexpected behavior with != operator. (fixes #26) [Valentin Lab]
  • Added mention of the hex_l property. (fixes #27) [Valentin Lab]

0.1.2 (2015-09-15)

Fix

  • Support for corner case 1-wide range_to color scale. (fixes #18)[Valentin Lab]

0.1.1 (2015-03-29)

Fix

  • Avoid casting an exception when comparing to non-Colour instances.(fixes #14) [Riziq Sayegh]

0.0.6 (2014-11-18)

New

  • Provide all missing 2 function by combination with other existingones (fixes #13). [Valentin Lab]

  • Provide full access to any color name in HSL, RGB, HEX convenienceinstances. [Valentin Lab]

    Now you can call colour.HSL.cyan, or colour.HEX.red for a direct encoding ofhuman colour labels to the 3 representations.

0.0.5 (2013-09-16)

New

  • Color names are case insensitive. [Chris Priest]

    The color-name structure have their names capitalized. And color namesthat are made of only one word will be displayed lowercased.

Fix

  • Now using W3C color recommandation. [Chris Priest]

    Was using X11 color scheme before, which is slightly different fromW3C web color specifications.

  • Inconsistency in licence information (removed GPL mention). (fixes #8)[Valentin Lab]

  • Removed gitchangelog from setup.py require list. (fixes #9)[Valentin Lab]

0.0.4 (2013-06-21)

New

  • Added make_color_factory to customize some common colorattributes. [Valentin Lab]
  • Pick color to identify any python object (fixes #6) [Jonathan Ballet]
  • Equality support between colors, customizable if needed. (fixes #3)[Valentin Lab]

0.0.3 (2013-06-19)

New

  • Colour is now compatible with python3. [Ryan Leckey]

TODO

  • ANSI 16-color and 256-color escape sequence generation
  • YUV, HSV, CMYK support

Release historyRelease notifications | RSS feed

0.1.5

0.1.4

0.1.3

0.1.2

0.1.1

Color Picker Cream

0.0.6

0.0.5

0.0.4

0.0.3

0.0.2

0.0.1

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Files for colour, version 0.1.5
Filename, sizeFile typePython versionUpload dateHashes
Filename, size colour-0.1.5-py2.py3-none-any.whl (23.8 kB) File type Wheel Python version py2.py3 Upload dateHashes
Filename, size colour-0.1.5.tar.gz (24.8 kB) File type Source Python version None Upload dateHashes
Close

Color Picker Circle

Hashes for colour-0.1.5-py2.py3-none-any.whl

Hashes for colour-0.1.5-py2.py3-none-any.whl
AlgorithmHash digest
SHA25633f6db9d564fadc16e59921a56999b79571160ce09916303d35346dddc17978c
MD59904afaee027aa215976ec87a30e27be
BLAKE2-2567446e81907704ab203206769dee1385dc77e1407576ff8f50a0681d0a6b541be
Close

Hashes for colour-0.1.5.tar.gz

Color Picker C++

Hashes for colour-0.1.5.tar.gz
AlgorithmHash digest
SHA256af20120fefd2afede8b001fbef2ea9da70ad7d49fafdb6489025dae8745c3aee
MD55f473c29e0c867ce0241ddba8cd552d6
BLAKE2-256a0d45911a7618acddc3f594ddf144ecd8a03c29074a540f4494670ad8f153efe
Select a base color for your color scheme.
pick a color
Remove Remove Add More
choose a harmony

Color Picker Chart

see results
Clear Clear Add More

Color Picker Chrome Extension

Whether you’re designing a logo or painting a house, choosing colors can be frustrating. Where do you start? Which colors work together, and why? How can you creatively explore different moods or directions?

Use the free Color Calculator to explore creative color options for your design project. Simply pick your base color(s), choose a color harmony, tweak/explore as needed, and see results. You’ll get a report of the hex, RGB, and CMYK color values for your project and see your colors applied to design samples. Share or print, rinse and repeat.

NOD Newsletter: Want design tips, tools, and news sent to your inbox?

1. Pick a Color. Click the first field to open the color picker and slide to select your desired hue (such as red, violet, or blue). Drag the dot right and left to adjust saturation or up and down to adjust value.

If you know the hexadecimal, RGB, or CMYK values for your base color enter them in the fields. Click plus to add up to three base colors

2. Choose a Harmony. Choose one of six color combinations to work with your starting color. Click the color harmony symbol to complete the color scheme.

3. See Results. The colors making up your harmony will display in the color calculator swatches and on the interactive color wheel.

Tweak or explore these choices by selecting and comparing different harmonies, viewing the same harmony with different colors, adjusting saturation or value, or adding additional input colors. Clear All to start over.

Like what you’re seeing? Create Color Scheme to see a color report—and save the hexadecimal, RGB, and CMYK colors for your Web or print projects.

See your swatch applied to design samples. Print the page, save it as a PDF, share it with friends and family. It’s a colorful world.

The color wheel is a chart representing the relationships between colors. Based on a circle showing the colors of the spectrum originally fashioned by Sir Isaac Newton in 1666, the colour wheel he created serves many purposes today. Painters use it to identify colors to mix and designers use it to choose colors that go well together.

The classic color wheel shows hues arranged in a circle, connected by lines or shapes. The colors include primary colors (red, yellow, and blue), secondary colors (orange, green, and violet), and tertiary colors (yellow green, blue green, blue violet, red violet, red orange, and yellow orange).Secondary colors are created by mixing primary colors. For example, mixing red and yellow creates orange; mixing yellow and blue creates green.

Designers often start a project by developing a color scheme: a set of colors that will work well together for the client or task at hand. Though you’ll sometimes start from scratch, generally you’ll begin with one or two base colors around with other colors will be built.

Color Harmony Basics How to choose colors that really work? Use the color wheel (or our color calculator) to help you identify harmonious color combinations. The following color harmonies are based on geometric relationships on the color wheel. For this reason, we can represent them as shapes. Rotate these shapes around the central point of the color wheel to create limitless color combinations.

Complementary color schemes use two opposite colors on the color wheel.

Monochromatic color schemes use three different values of the same color.

Analogous color schemes use three adjacent colors on the color wheel.

Split complements use a color and the two adjacent tertiary colors of its complement.

Triadic color schemes use three evenly spaced colors on the color wheel.

Tetradic color schemes use two complementary pairs.

Color Picker C#

Choosing the Right Colors Choosing the right colors for you requires a lot of creativity and experimentation. Bear in mind that color is very psychological and different color harmonies produce different effects. For example, analogous colors are similar in hue, creating a smooth transition from one color to the next. Complementary colors are opposite to each other on the color wheel, so they create a strong contrast. Monochromatic color schemes can be subtle and sophisticated.

In this magazine spread from Martha Stewart magazine, for example, an analogous color scheme creates a gentle transition from yellow to yellow-green to green. It’s pleasing to the eye.

Experiment with different harmonies to achieve the desired mood or effect.

Adjusting Color Value and Saturation Once you’ve selected your colors, you may wish to adjust the value of a specific color or colors—how light or dark the color is. Or you may wish to adjust its saturation, how rich it is. Each hue on the online color wheel has a different inherent value. Yellow, for example, is lighter than blue.

In this color scheme, the pinks and oranges are the lightest values, contrasting with the dark lettering.

Color Picker Chrome

To increase contrast in your color scheme, you may need to adjust the value of a specific color—by making a yellow darker or lighter, say. Or perhaps adjust the saturation to vary the intensity. You can do both using the color calculator.





Comments are closed.