Menu
Is free
registration
home  /  Problems/ Color in computer graphics. The use of color in computer graphics Color attributes in computer graphics

Color in computer graphics. The use of color in computer graphics Color attributes in computer graphics

I... Color systems in computer graphics

1. Basic concepts of computer graphics ………………… 2 p.

2. Color and color models …………………………………… ... 4 p.

3. RGB color model ………………………………………… 5 p.

4..Systems of colors HSB and HSL …………………………………. 6 p.

5. HSB color model ………………………………………… 7 p.

6. CIE Lab color model …………………………………… ..8 p.

7. Color model CMYK, color separation …………………… .. 8 p.

II... Practical part

1.Practical question (creating a drawing in CorelDRAW)

List of used literature …………………… ............. 11 p.

Basic concepts of computer graphics

In computer graphics, the concept of resolution is usually the most confusing, because you have to deal with several properties of different objects at once. A clear distinction should be made between screen resolution, printing device resolution and image resolution. All of these concepts refer to different objects. These types of resolution are not related to each other in any way until you need to know what physical size the picture on the monitor screen, print on paper or a file on the hard disk will have.

Screen resolution is a property of the computer system (depends on the monitor and video card) and the operating system (depends on the Windows settings). Screen resolution is measured in pixels (points) and determines the size of an image that can fit on the entire screen.
Printer resolution is a property of a printer that expresses the number of discrete dots that can be printed in a unit length. It is measured in units of dpi (dots per inch) and determines the size of the image at a given quality, or, conversely, the image quality at a given size.

Image resolution is a property of the image itself. It is also measured in dots per inch - dpi and is set when creating an image in a graphics editor or using a scanner. So, for viewing an image on the screen, it is enough that it has a resolution of 72 dpi, and for printing on a printer - at least 300 dpi. The image resolution value is stored in the image file.

The physical size of the image determines the size of the picture vertically (height) and horizontally (width) can be measured both in pixels and in units of length (millimeters, centimeters, inches). It is set when the image is created and is stored with the file. If an image is being prepared for display on a screen, then its width and height are set in pixels in order to know how much of the screen it occupies. If the image is being prepared for printing, then its size is set in units of length in order to know how much of a sheet of paper it will take.
The physical size and resolution of an image are inextricably linked. When you change the resolution, the physical size changes automatically.

When working with color, the following concepts are used: color depth (also called color resolution) and color model.
A different number of bits can be allocated to encode the color of a pixel in an image. This determines how many colors can be displayed on the screen at the same time. The longer the length of the color binary code, the more colors can be used in the drawing.

Color depth is the number of bits used to encode the color of one pixel. To encode a two-color (black-and-white) image, it is enough to allocate one bit to represent the color of each pixel. Allocating one byte allows 256 different color shades to be encoded. Two bytes (16 bits) allow 65536 different colors to be defined. This mode is called High Color. If three bytes (24 bits) are used to encode color, 16.5 million colors can be displayed simultaneously. This mode is called True Color. The size of the file in which the image is saved depends on the color depth.

Colors in nature are rarely simple. Most color shades are formed by mixing primary colors. The method of dividing a color shade into its constituent components is called a color model... There are many different types of color models, but in computer graphics, there are usually no more than three. These models are known under the names: RGB, CMYK, НSB.

Color and color models.

The color is additive and subtractive.

An additive color is obtained by combining light of different colors. In this scheme, the absence of all colors is black, and the presence of all colors is white. An additive color scheme works with emitted light, such as a computer monitor.

In the subtractive color scheme, the opposite process occurs. This is where a color is obtained by subtracting other colors from the total beam of light. In this scheme, white appears as a result of the absence of all colors, while their presence gives black. The subtractive color scheme works with reflected light.

In computer graphics, the concept of color resolution is used (another name is color depth). It defines a method for encoding color information for display on a monitor screen. Two bits (white and black) are sufficient to display a black and white image. Eight-bit encoding allows for 256 gradations of color tone. Two bytes (16 bits) define 65,536 shades (this mode is called High Color). With a 24-bit coding method, it is possible to define more than 16.5 million colors In accordance with the principles of image formation by additive or subtractive methods, methods have been developed for dividing a color shade into component components, called color models. In computer graphics, RGB and HSB (for creating and processing additive images) and CMYK ( for printing a copy of an image on a printing equipment) Color models are located in a three-dimensional coordinate system that forms a color space, since it follows from Grossman's laws that color can be expressed by a point in three-dimensional space.

Grassmann's first law (the law of three-dimensionality). Any color is uniquely expressed by three components if they are linearly independent. Linear independence consists in the impossibility of obtaining any of these three colors by adding the other two.

Grassmann's second law (continuity law). With a continuous change in radiation, the color of the mixture also changes continuously. There is no such color to which it would be impossible to pick up infinitely close.

Grassmann's third law (additivity law). The color of the mixture of radiations depends only on their color, but not on the spectral composition. That is, the color (C) of the mixture is expressed by the sum of the color equations of the radiation:

Csum = (R1 + R2 +… + Rn) R + (G1 + G2 +… + Gn) G + (B1 + B2 +… + Bn) B.

RGB color model

A computer monitor creates color directly by emitting light and uses an RGB color scheme.

The RGB color model is additive, that is, any color is a combination in different proportions of the three primary colors - red (Red), green (Green), blue (Blue). It serves as the basis for the creation and processing of computer graphics intended for electronic reproduction (on a monitor, TV). If you look at the monitor screen from a close distance, you will notice that it consists of the smallest dots of red, green and blue colors. The computer can control the amount of light emitted through any colored dot, and by combining different combinations of any colors, it can create any color. When one component of the primary color is superimposed on another, the brightness of the total radiation increases. The combination of the three components gives an achromatic gray color, which approaches white with increasing brightness. At 256 tonal levels, black corresponds to zero RGB values, and white corresponds to the maximum, with coordinates (255,255,255).

Due to the nature of computer monitors, the RGB scheme is the most popular and widespread, but it has a drawback: computer drawings do not always have to be present only on the monitor, sometimes they have to be printed, then another color system must be used - CMYK.

HSB and HSL color systems

The HSB and HSL color systems are based on hardware constraints. In HSB, a color is described in terms of hue, saturation, and brightness. Another HSL system sets hue, saturation and lightness. A hue is a specific shade of a color. The saturation of a color characterizes its relative intensity or frequency. Brightness or luminance indicates the amount of black tint added to a color, making it darker. The HSB system matches well with the human perception of color, that is, it is the equivalent of the wavelength of light. Saturation is the intensity of the wave and brightness is the total amount of light. The disadvantage of this system is that to work on computer monitors it must be converted to RGB, and for four-color printing to CMYK.

HSB color model

The HSB color model is designed with maximum consideration for the characteristics of human color perception. It is based on Munsell's color wheel. Color is described by three components: Hue, Saturation and Brigfitness. The color value is sampled as a vector outgoing from the center of the circle. A point in the center corresponds to white, and points along the perimeter of a circle correspond to pure spectral colors. The direction of the vector is specified in degrees and determines the hue. The length of the vector determines the saturation of the color. On a separate axis, called achromatic, brightness is set, with the zero point corresponding to black. The color gamut of the HSB model covers all known real-world color values.

- RAMDAC frequency 250 - 350 MHz;

- color depth - 24/32 bit / pixel;

The depth of the Z-buffer is 16-32 bits;

AGP 2X / 4X interface;

- API - DirectX 6, DirectX 7, DirectX 8.

- along with universal APIs, video adapter companies, are developing specialized APIs that allow you to expand the possibilities of forming a graphic image.

Color in computer graphics

Color is primarily characterized by the brightness of the image, which means light. Light can be emitted i.e. coming from some source (sun, electric light or display screen), and reflected from the surface of the object. The emitted light can contain all colors (white light), any combination of them, or just one color. Light can change color when it bounces off an object. Thus, the color of an object is determined by the color of the incident light and the color that the object reflects, i.e. reflective properties of the object.

Color can be formed when light is emitted and when it is reflected. As a consequence, there are a number of methods for describing and shaping color (so-called color systems or color space).

Most often in computer graphics and related fields, they are used

the system is additive colors and the system subtractive colors.

An additive color is obtained by combining rays of light of different colors. In this system, the absence of all colors corresponds to black, and the presence of all colors corresponds to white. An additive color system (RGB system) is used to describe the emitted light, for example, from a monitor screen. How from-

It is known from physics that in this case three primary colors are used: red, green, blue (R, G, B). When mixed in equal proportions, they form white, and when mixed in different proportions, any other color.

In the subtractive color system, the opposite process takes place. Any color is obtained by subtracting some color from the total luminous flux. In this system, white appears as a result of the absence of all colors, and their presence gives black. The subtractive color system is used when working with reflected light, for example, from paper (publishing, printing, multicolor printing). A white background reflects all colors, a background of an arbitrary color - absorbs some, reflects the rest. In this system, cyan, magenta and yellow (CMY) are the main colors. These colors are the opposite of red, green, blue (RGB). When these colors are mixed in equal proportions on a white background, the result is theoretically black. In fact, ink and other materials do not completely absorb color, resulting in color distortion. Therefore, a little Black paint is added to these three colors. A color system based on such a four-color process is referred to as CMYK.

Graphics file formats

Format is a way of organizing data in computer memory, on external media, in a database, etc. The number of currently used format types is very large; they are usually divided into groups - text, graphics, databases, spreadsheets, Windows, Unix. Many formats exist for storing graphic information. Almost any software for working with computer graphics uses its own file format, although in recent years many

workers are trying to support some formats that have become almost universal

versal (TIFF, PCX, BMP, JPEG, etc.).

Graphic format Is a format in which data describing a graphic image is recorded in a file. Such formats are used in order to logically and efficiently organize, save and restore graphic data. In accordance with the types of computer graphics, the most common currently are raster, vector and metafile graphic formats. There are other types of formats - scene formats, animation, multimedia, hypertext and hypermedia, volumetric (three-dimensional), audio formats, font formats, etc.

Raster formats used to store raster data. Files of this type contain an accurate pixel map of the image and are well suited for storing real images, such as a photographic one. The renderer recreates this image on the display surface of the output device. Bitmap images are easy to process and pack, but distortion occurs when such images are stretched and compressed. Bitmap printing can only be performed on devices that support dot output; in particular, plotters do not support raster file formats. Transferring an image to different output devices can create problems with changing the resolution of a graphic image.

The most common bitmap formats are Microsoft BMP, PCX, TIFF, TGA, GIF, JPEG, etc.

Vector files do not contain pixel values, but mathematical descriptions of image elements - lines, curves, polygons, splines, as well as elements that can be decomposed into simple geometric objects. The visualization program builds an image based on the mathematical descriptions of graphic forms. Vector formats are widely used in CAD programs, as they make it easy to manipulate fragments.

images, scale them, etc. However, these formats are not suitable for photo processing or image scanning.

Vector files are structurally simpler than most raster files. The most common vector formats are

AutoCAD DXF, Microsoft SYLK, WMF, EPS, etc.

Metafiles can store both raster and vector data. They resemble vector files in that they contain the means for defining vector data items, but they can also include a raster representation of an image. Metafiles are often used to transport raster and vector data and images between hardware and software platforms. The most common metafile formats are COM, WPG, PICT.

Scene format files (scene description files) are designed to store a compressed representation of an entire image (or scene). They are close to vector files, however, unlike them, they do not contain descriptions of parts of the image, but consist of instructions that allow the rendering program to restore the entire image.

Animation formats appeared relatively recently. The simplest of them store images in their entirety, allowing you to quickly display them in a loop one after another. More complex animation formats store only the differences between two consecutively displayed images (frames) and change only those pixels that change when the next frame is displayed. With video animation, to create the illusion of smooth movement, you must display at least 25 frames per second. Examples of animation formats are TDDD and TTDDD.

Multimedia formats are designed to store different types of data in one file. They usually allow the integration of graphic, audio and video information. Examples are firm's RIFF formats

Microsoft, MPEG and FLI from Autodesk.

Hypertext is a system that provides non-linear access to information, usually textual. The term hypermedia refers to the synthesis of hypertext and multimedia. Modern hypertext languages ​​and network protocols support a wide variety of media, including text and fonts, still and dynamic graphics, audio and video data. Hypertext provides a structure that allows you to organize, display, and interactively navigate your media. Hypertext and hypermedia systems, such as WWW, store information resources in the form of GIF, JPEG, MPEG, AVI, PostScript, etc. files.

3D formats... Files of this format store a description of the shape and color of volumetric models of imaginary and real objects. Three-dimensional models are usually constructed from polygons and smooth surfaces, taking into account the descriptions of the corresponding elements: color, texture, optical effects, etc. On this basis, the renderer reconstructs the object. Models are placed in scenes with light sources and cameras (i.e., viewpoints are indicated), so objects in 3D files are often

are called scene elements.

Visualization of three-dimensional models is carried out by modeling and animation programs (for example, 3DStudio from Autodesk). They allow you to adjust the appearance of the image by changing and complementing the lighting system, the texture of scene elements and their relative position, and provide motion simulation. 3D data is now supported in a number of formats that were previously only used to store 2D vector data, such as the DXF format. These types of formats are sometimes referred to as extended vector formats.

Color in multimedia systems can be used as a code, or as a design tool. The color code is used to separate the different types of information displayed on the screen. For example, operating system alarms are usually displayed with a red background.

As a design tool, color is used to attract attention, to psychologically influence the user: to create a certain mood, excite the necessary emotions, to balance the screen and just for decoration.

When working with color, designers use a special tool - color circle, which shows the relationship between different colors and illustrates their relationship with each other. With the help of the color wheel, you can select colors that go well with each other, and ensure the stylistic unity of the created document. The colors on the color wheel are arranged as follows: red 0 degrees; yellow - 60; green - 120; cyan - 180; blue - 240; magenta - 360.

The nature of color was discovered by I. Newton and M.V. Lomonosov. Their experiments took place in a darkened room, in the wall of which a gap was cut through which a ray of sunlight penetrated. A glass prism was placed in the path of this beam. Passing through the prism, the sunbeam decomposed into components: red, orange, yellow, green, blue, blue and violet colors, which could be observed on the screen. Moving the screen aside, they put a second glass prism in its place, turned towards the first - from which a white ray came out onto the screen again. This proved that white is composed of many other colors. By placing strips of paper between the prisms, the researchers began to overlap individual colors, observing how the color of the beam at the exit of the second prism changed. Thus, it was found that different colors are not the same in their capabilities. Groups of primary colors were identified, mixing of which made it possible to obtain other colors. The group consisting of red (Red), green (Green) and blue (Blue) had the greatest opportunities. According to the first letters of the English names of these flowers, the group was named RGB... Mixing these colors in different proportions made it possible to obtain any other shade of colors, including white. This group of colors later became the main one in the production of color televisions and monitors of electronic computers.

Another group of primary colors has similar capabilities: CMYK - C yan, M agenta, Y ellow, blac K(cyan or turquoise; cherry or purple or crimson; yellow; and black). This group of colors has become widespread in the printing industry and among artists. It is also the main one in devices for outputting information from computers - color printers, for example, the CMYK group can be obtained from RGB due to the fact that red and green, in the absence of blue, form yellow, green and blue, in the absence of red, form cyan , red and blue in the absence of green is magenta, and the complete absence of all colors is black.

A triad of primary printing colors: cyan, magenta and yellow ( CMY, without black) is, in fact, the heir to the three main colors of painting (blue, red and yellow). The change in the shade of the first two is associated with a different chemical composition of printing inks from artistic ones, but the principle of mixing is the same. Both artistic and printing inks, despite the proclaimed self-sufficiency, cannot give very many shades. Therefore, artists use additional inks based on pure pigments, and printers add at least black ink (black color in computer output devices is formed due to the absence of R, G and B or C, M and Y, respectively).

The colors obtained by mixing the main ones are called derivatives. Colors located opposite each other on the color wheel are called complementary.

Sometimes in graphic design, other color models are used that are not based on the composition of the primary colors, for example, the model HSB- Hue, Saturation, Brightness, or Hsl- Hue, Saturation, Lightness. Brightness is usually called the degree of closeness of a given color to white or black. It is measured in% of black or white that is blended with a given color. (Screening is the operation of mixing a pure tone with black. For example, a blue that contains 40% black is twice as bright as the same blue that contains 80% black).

Hue (color) determines how different a given color is from others. It is determined by the angle in degrees on the color wheel.

Saturation is a measure of the intensity of a color. The higher the saturation, the more vibrant the color appears. At low saturation, the color appears dark and dull. Saturation (as well as brightness and illumination) is measured as a percentage. Saturation of 100% defines the pure color. Saturation 0% defines white, black, or gray.

By combining different shades and changing their brightness and saturation, you can get a variety of effects, operating with just a few colors.

The HSB (HSL) system has an important advantage over other systems: it is more consistent with the nature of color, well consistent with the human color perception model. Many shades can be quickly and conveniently obtained in HSB or HSL, and then converted to RGB or CMYK.

In terms of emotional impact, most colors can be classified into one of two categories - warm or cold colors.

Warm tones create the effect of movement towards the beholder, seem closer, attract attention, have an exciting effect. These include red, orange, yellow colors.

Cold tones seem to recede, create a sense of movement away from the beholder, can create a sense of alienation and isolation, but can both calm and reassure. Cold colors include blue, blue, purple.

Green is neutral.

The motion effect produced by warm and cool colors is often used by designers when they choose cool colors for the background and warm ones for objects in the foreground. In documents dominated by warm tones, cool colors can be used to decorate highlights and enhance contrast, and vice versa. By using cold shades, you can emphasize frivolity, elegance or austerity of the publication. Deep warm colors are exciting or convey a sense of intimacy.

It should also be borne in mind that the background color can change the shade of the base color and the impression it makes.

But colors have many different variations: cold flowers have warm varieties, and warm ones have cold ones. Therefore, the selection of colors is a creative process in which there are no unambiguous recommendations.

When using color codes (so-called “visual guides”), it must be borne in mind that an unprepared person cannot remember more than seven codes. Therefore, you should not get carried away with the use of color codes. In addition, the color coding should be consistent - within the framework of one document, one electronic information system, the same color codes should be used to denote the same phenomena and processes.

Various color combinations greatly affect the readability of the text. The text and background should contrast with each other. The stronger the contrast, the better the text reads. In addition to the standard black text on a white background, black text on a yellow background and orange text on a white background are successful combinations.

Color is a very powerful design tool that helps to grab attention, direct the eye in the right direction, and keep the user interested. But the color scheme in no way should distract the user from the main content, come into conflict with it.

Hollywood movie quality allows for about 20 million different colors to be displayed on the screen at the same time. A pixel attribute of 1 byte allows 256 different colors to be encoded (VGA - Video Graphic Array). The 15-bit attribute of the SVGA (Super VGA) board allows 32768 colors to be displayed on the screen simultaneously (5 bits for encoding each color - 32 different shades for red, blue and green, i.e. 32 × 32× 32 = 32768). 24-bit attribute of special graphics cards (Silicon Graphic, Indy R4000, Targa, etc.) allows displaying simultaneously

256× 256× 256 = 16777216 colors.

These are the capabilities provided by display adapters (video cards). But in order to display such a number of colors on the screen at the same time, you need to have at least one pixel on the screen for each color. And at standard resolution, the monitor screen contains 640 × 480 = 307200 pixels. It is physically impossible to get more colors on such a screen.

If the adapter allows you to work with 24-bit color coding, and the monitor screen cannot perceive such a number of colors, you have to work with palette- a limited set of colors corresponding to the capabilities of the screen. The colors on the palette can be changed. But it should be remembered that when reproduced on another computer, colors may be distorted if another palette is loaded in the color table of this computer.

Problems with palettes arise when the correct color rendering of computer graphics is achieved on different computers (for example, when using the created multimedia system on the WWW). If you have an image containing millions of colors, then for correct color reproduction in WWW conditions, you must reduce the number of colors to 256.

The Internet still uses the Index Color color model, which works on the principle of 8-bit color. It works by creating a color picker. All shades in the file are divided into 256 possible options, each of which is assigned a number. Further, based on the resulting color palette, a table is built, where each cell number is assigned a color shade in RGB values.

Color reduction is performed using a dithering operation. Color clipping is a process of changing the color value of each pixel according to a certain algorithm to the nearest color value from the available (installed) palette.

Color in computer graphics.

When working with color, the following concepts are used: color depth (also called color resolution) and color model.
A different number of bits can be allocated to encode the color of a pixel in an image. This determines how many colors can be displayed on the screen at the same time. The longer the length of the color binary code, the more colors can be used in the drawing. Color depth is the number of bits used to encode the color of one pixel. To encode a two-color (black-and-white) image, it is enough to allocate one bit to represent the color of each pixel. Allocating one byte allows 256 different color shades to be encoded. Two bytes (16 bits) allow 65536 different colors to be defined. This mode is called High Color. If three bytes (24 bits) are used to encode color, 16.5 million colors can be displayed simultaneously. This mode is called True Color. The size of the file in which the image is saved depends on the color depth.

Colors in nature are rarely simple. Most color shades are formed by mixing primary colors. The method of dividing a color shade into its constituent components is called color model... There are many different types of color models, but in computer graphics, there are usually no more than three. These models are known under the names: RGB, CMYK, НSB.

1. RGB color model.

The simplest and most obvious model is RGB. Monitors and household TVs work in this model. Any color is considered to be composed of three main components: red (Red), green (Green) and blue (Blue)... These colors are called primary colors.

It is also believed that when one component is superimposed on another, the brightness of the total color increases. The combination of the three components gives a neutral color (gray), which tends to white at high brightness. This corresponds to what we observe on the monitor screen, therefore this model is always used when preparing an image intended for display on the screen. If the image undergoes computer processing in a graphics editor, then it should also be presented in this model.
The method of obtaining a new shade by summing the brightness of the constituent components is called additive method... It is used wherever a color image is viewed in transmitted light ("through"): in monitors, slide projectors, etc. It is easy to guess that the lower the brightness, the darker the shade. Therefore, in the additive model, the center point with zero component values ​​(0,0,0) is black (no luminescence of the monitor screen). The maximum values ​​of the components correspond to white (255, 255, 255). The RGB model is additive, and its components red (255.0.0), green (0.255.0), and blue (0.0.255) are called basic colors.

2. Color model CMYK.

This model is used to prepare not screen, but printed images. They differ in that they are seen not in transmitted light, but in reflected light. The more ink is put on the paper, the more light it absorbs and less reflects. The combination of the three main colors absorbs almost all the incident light, and from the side the image looks almost black. In contrast to the RGB model, an increase in the amount of paint does not lead to an increase in visual brightness, but, on the contrary, to a decrease in it.

Therefore, for the preparation of printed images, not an additive (summing) model is used, but subtractive (subtractive) model... The color components of this model are not the primary colors, but those that are obtained by subtracting the primary colors from white:
blue (Cyan)= White - Red = Green + Blue (0,255,255)
magenta (lilac) (Magenta)= White - Green = Red + Blue (255,0,255)
yellow (Yellow)= White - Blue = Red + Green (255,255,0)
These three colors are called additional because they complement the primary colors to white.
Black is a significant difficulty in printing. Theoretically, it can be obtained by combining three main or additional paints, but in practice the result turns out to be unusable. Therefore, a fourth component has been added to the CMYK color model - black... This system owes him the letter K in the name (blacK).

In printing houses, color images are printed in several stages. By overprinting cyan, magenta, yellow, and black on paper, one at a time, you get a full-color illustration. Therefore, the finished image obtained on a computer, before printing, is divided into four components of one-color image. This process is called color separation. Modern graphics editors have the means to perform this operation.
Unlike RGB, the center point is white (no dye on white paper). Added to the three color coordinates a fourth one - the intensity of the black paint. The black axis looks isolated, but it makes sense: adding the colored components to the black color will still result in black. Everyone can check the addition of colors in the CMYK model by picking up blue, chamois and yellow pencils or felt-tip pens. A mixture of blue and yellow on paper gives green, gray and yellow - red, etc. Mixing all three colors results in an undefined dark color. Therefore, in this model, black was needed additionally.

3. Color model НSB.

Some graphics editors allow you to work with the HSB color model. If the RGB model is most convenient for a computer, and the CMYK model is for printing houses, then the HSB model is most convenient for a person. It is simple and intuitive. The HSB model also has three components: hue of color (Hue), color saturation and color brightness... By adjusting these three components, you can get as many arbitrary colors as you would with other models. The hue of the color indicates the number of the color in the spectral palette. Color saturation characterizes its intensity - the higher it is, the "purer" the color. The brightness of the color depends on the addition of black to the given one - the more it is, the less brightness of the color. The HSB color model is convenient for use in those graphic editors that are focused not on processing finished images, but on creating them with your own hands. There are programs that allow you to simulate various artist's tools (brushes, pens, felt-tip pens, pencils), paint materials (watercolor, gouache, oil, ink, charcoal, pastel) and canvas materials (canvas, cardboard, rice paper, etc.). When creating your own artwork, it is convenient to work in the HSB model, and at the end of the work it can be converted to RGB or CMYK, depending on whether it will be used as a screen or printed illustration. The color value is sampled as a vector outgoing from the center of the circle. The center point is white (neutral), and the points around the perimeter are solid colors. The direction of the vector determines the hue and is specified in the HSB model in angular degrees. The length of the vector determines the saturation of the color. The brightness of the color is set on a separate axis, the zero point of which is black.

Colour - one of the factors of our perception of light radiation. It was believed that white light is the simplest. Newton's experiments refuted this. Newton sent white light through a prism, as a result of which it decomposed into 7 components (7 colors of the rainbow). The reverse process (i.e., passing a set of different colors through another prism) again produced white.

The light we see is only a small range of the electromagnetic spectrum.

Think of white as a mixture of all the colors of the rainbow. In other words, the spectrum of white is continuous and uniform - it contains radiation of all wavelengths of the visible range.It can be assumed that if we measure the intensity of light emitted or reflected from an object at all visible wavelengths, then we will fully determine the color of that object.

However, in reality, such a measurement does not predict the visual presentation of the object. Thus, it is possible to determine only those optical properties that affect the observed color:
  1. Color tone... It is possible to determine the predominant wavelength in the emission spectrum. Hue helps you distinguish one color from another.
  2. Brightness... Determined by energy, intensity of light radiation. Expresses the amount of light perceived.
  3. Saturation (purity of tone) ... It is expressed by the proportion of the presence of white. In a perfectly pure color, there is no impurity of white.

Therefore, to describe the color, the concept is introducedcolor model - as a way of representing a large number of colors by decomposing it into simple components.

There are 2 color systems to describe color models:


  • additive:additive color synthesis involves obtaining color by mixing radiation. In additive synthesis, by white we mean the mixing of the basic radiation in the maximum amount, and the black color is the complete absence of radiation.
  • subtractive: during subtractive synthesis, the components of radiation do not enter the eye directly, but are transformed by the optical medium - the colored surface.Its coloring serves as a converter of the radiation energy of the light source. Reflecting from it or passing through, some rays are weaker, others weaker.

RGB color model.

One of the most common color models, called the RGB model, is based on the reproduction of any color by adding three primary colors:red(Red), green(Green) and blue(Blue). Each channel - R, G or B has its own separate parameter indicating the amount of the corresponding component in the final color.

Primary colors are divided into shades in terms of brightness (from dark to light), and each gradation of brightness is assigned a digital value (for example, the darkest is 0, the lightest is 255).

In the RGB model, a color can be represented as a vector in a three-dimensional coordinate system with the origin at the point (0,0,0). We take the maximum value of each of the vector components as 1. Then the vector (1,1,1) corresponds to white.All the colors are inside the resulting cube, forming a color space.
It is important to note the special points and lines of this pattern.

  • Origin: at this point all components are equal to zero, there is no radiation (black color)
  • Point closest to the viewer: at this point all components have their maximum value (white)
  • On the line connecting the previous two points (diagonally), gray shades are located: from black to white (gray scale, usually 256 gradations). This is because all three components are the same and range from zero to maximum.
  • Three vertices of the cube give pure original colors, the other three reflect double blends of the original colors.

Despite the incomplete coverage, the RGB standard is currently adopted for almost all emitting graphic output devices (televisions, monitors, plasma panels, etc.)

Color model CMY (K)

The CMY model also uses three primary colors: Cyan, Magenta, and Yellow.

These colors describe the light reflected from white paper in the three primary colors of the RGB model.

The color is formed on a white background.

The colors are directly opposite to red, blue and green, i.e. cyan completely absorbs red, magenta absorbs green, and yellow absorbs blue.

For example, combining equal proportions of all three CMY inks at one point will result in all white light not being reflected, and therefore black. But at the same time and in equal proportions, applied all kinds of pairs from the CMY triplet will give us the basic RGB colors.

CMY model colors are additional to RGB colors. Complementary color - a color complementary to the given one to white. So, for example, an additional color for red is blue; for green - purple; for blue - yellow

Special points and lines of the model.

  • Origin of coordinates: in the complete absence of paint (zero values ​​of the components), the color will turn out to be white (white paper)
  • Point closest to viewer: Mixing the maximum values ​​of all three components should result in black.
  • The line connecting the previous two points (diagonally). Mixing equal values ​​of the three components will give shades of gray.
  • Three vertices of the cube give pure original colors, the other three reflect double blends of the original colors.
The CMY color model is the main one in the printing industry. Color printers also use this model. But for that in order to print black, you need a large amount of ink and besides, mixing all the colors of the CMY model will actually give not black, but a dirty brown color. Therefore, to improve the CMY model, an additional color was introduced into it - black. It is the key color for printing, therefore the last letter in the model name is K (Key), not B. Thus, the CMYK model is four-channel. This is another difference from RGB.


HSV color model

The considered models are focused on working with color transmitting equipment and are inconvenient for some people. Therefore, the HSV model relies on intuitive concepts of hue, saturation and brightness.

In the color space of the HSV model (Hue - tone, Saturation - saturation, Value - the amount of light), a cylindrical coordinate system is used, and the set of allowed colors is a hexagonal cone placed on top.

The base of the cone represents vibrant colors and matchesV= 1. However, the base colorsV= 1 do not have the same perceived intensity. Tone (H) is measured by the angle measured around the vertical axisOV... In this case, the red color corresponds to an angle of 0 °, green corresponds to an angle of 120 °, and so on. Colors that complement each other to white are opposite each other, that is, their tones differ by 180 °. The magnitudeSvaries from 0 on the axisOVup to 1 on the faces of the cone.

The cone has a unit height ( V= 1) and the base located at the origin. At the base of the cone, the quantities H and S do not make sense. White corresponds to a pair S = 1, V= 1. Axis OV (S= 0) corresponds to achromatic colors (gray tones).

The process of adding white to a given color can be thought of as decreasing the saturation. S, and the process of adding black is like dimming V... The base of the hexagonal cone corresponds to the projection of the RGB cube along its main diagonal.