Determines the color under the cursor in the image. PAINT Tutorial How to choose a background color in paint


A web designer, developer, or ordinary computer user has probably asked this question more than once. Often there is a need to select the color used on some object, for example a website or just a point on a monitor screen.

There are several basic ways to represent colors, such as when each color or shade is designated HTML code and color palette RGB as #FF7700. This is represented in the form of three pairs of hexadecimal digits, in which each pair is responsible for its own color:
the first two digits are red, i.e. — R(red)
two in the middle - green - G (green)
last two digits - blue - B (blue)
Quite often they use a sneaky representation of the color in the form of three characters #F70, which would be equivalent to #FF7700.

By the way, on web resources colors are usually specified in CSS styles.

Let's move on to answering the main question - How to find out the color of a pixel on a monitor screen or picture?

There are many ways...

Method 1. Find out the color in Photoshop

So, let's take a “screenshot” by pressing the Print Screen (PrtSc) key on the keyboard, in the place where we want to find out the code for our color. When you press the key, the system will save the snapshot to the clipboard. You can simply copy the image, for example from a browser, without PrtSc. Now all that remains is to paste the image from the buffer into Photoshop.

Open Photoshop and insert an image (File - New, Editing - Insert). We look for “Pipette” on the toolbar (Key I), then left-click in the area in which we want to “remove” the color. All is ready! Now all that remains is to go to the palette and find out the color code.

Method 2. Find out the color in Paint

Go to Paint - insert a picture - use the "palette" tool - go to "change colors":

In our case, red is 252, green is 168, blue is 10, i.e. RGB(252,168,10) or in HEX format #FCA80A.

Method 3: View the element code in the browser

I will describe a method for the Opera browser. Select an element on the site with the mouse and right-click on it - “View element code” (Ctrl + Shift + C). A panel with html and css code will open, you will need to find something like “color”.

Method 4. Using special tools or programs.

There are a large number of special programs for removing color; I like a very simple program called "Pixie" with a weight of about 10-11 KB. The controls are very simple. Simply point the mouse at the desired point on the monitor screen and press the following keys - Ctrl + Alt + C, as a result of which the color code will be copied to the clipboard.

When working with images, you often need to accurately determine the color of a pixel. This is needed for image correction or in design work to adjust the color scheme of the background, panels or buttons of your Internet page or website.

This service will allow you to find out the color of a dot online without downloading and installing additional programs. Working in our online eyedropper service, you can quickly and easily find out the color of any part of the image.

To do this, you need to upload a picture to the site. To download the file, click the "Browse" button. Select the desired image file and click "Upload". As soon as the image loads, you will see it on the screen. Then you need to move the cursor over the pixel whose color you want to determine. In a separate window, you will be able to see the pixel color, and the Current Value field will display the corresponding pixel number in the HTML and RGB color of the pixel.

The service provides for saving the color code in HTML and RGB color format. To do this, you need to move the cursor over the desired pixel and click the left mouse button. In the “Saved Values” field in a separate window, you can see the pixel color, as well as the saved pixel code values ​​in HTML and RGB color format.

Reviews

Yes it seems good, thanks
Normal
masterpiece
weight
We helped you a lot loys

Paint is a Windows feature, which you can use to create drawings in the blank drawing area or on existing images. Most of the tools used in the Paint program can be found in the ribbon, located at the top edge of the Paint program window.

The illustration shows the ribbon and other parts of the Paint window.

Drawing lines in Paint

You can use several different tools to draw in Paint. The appearance of the line in the figure depends on the tool used and the selected parameters.

Here are the tools you can use for drawing lines in Paint.

Pencil

The Pencil tool is used to draw thin, free-form lines or curves.

  1. On the tab home in Group Service click tool Pencil.
  2. In Group Colors click Color 1, select a color and drag onto the image to paint. To draw color 2 (background)

Brushes

The Brushes tool is used to draw lines of different shapes and textures, just like using professional brushes. Using various brushes you can draw arbitrary and curved lines with various effects.

  1. On the tab, click the down arrow in the list Brushes.
  2. Select a brush.
  3. Click Size and select the line size, determines the thickness of the brush stroke.
  4. In Group Colors click Color 1, select a color, and drag the pointer to draw. To draw color 2 (background), hold down the right mouse button while dragging the pointer.

Line

The Line tool is used when you need to draw a straight line. When using this tool, you can select the thickness of the line, as well as its type.

  1. On the tab home in Group Figures click tool Line.
  2. Click Size
  3. In Group Colors click Color 1 color 2 (background), hold down the right mouse button while dragging the pointer.
  4. (Not necessary) Figures click Circuit and select a line style.

Advice: To draw a horizontal line, hold down the Shift key and drag your pointer from one side to the other. To draw a vertical line, hold down the Shift key and drag your pointer up or down.

Curve

The Curve tool is used when you need to draw a smooth curve.

  1. On the tab home in Group Figures click tool Curve.
  2. Click Size and select the line size, determines the thickness of the line.
  3. In Group Colors click Color 1, select a color and drag to draw a line. To draw a line color 2 (background), hold down the right mouse button while dragging the pointer.
  4. After creating the line, click on the area of ​​the image where you want to place the bend of the curve and drag to change the curve.

Drawing curved lines in the graphic editor Paint

Drawing various shapes in Paint

By using Paint programs You can add various shapes to the drawing. Among the ready-made shapes there are not only traditional elements - rectangles, ellipses, triangles and arrows - but also interesting and unusual shapes, such as a heart, lightning bolt, footnotes and many others.

To create your own shape, you can use the Polygon tool.

Ready-made figures

Using the Paint program, you can draw different types of ready-made shapes.

Below is a list of these figures:

  • Line;
  • Curve;
  • Oval;
  • Rectangle and rounded rectangle;
  • Triangle and right triangle;
  • Rhombus;
  • Pentagon;
  • Hexagon;
  • Arrows (right arrow, left arrow, up arrow, down arrow);
  • Stars (quadrangular, pentagonal, hexagonal);
  • Footnotes (rounded rectangular footnote, oval footnote, cloud footnote);
  • Heart;
  • Lightning.
  1. On the tab home in Group Figures Click the finished shape.
  2. To draw a shape, drag. To draw an equilateral shape, hold down the Shift key while dragging the pointer. For example, to draw a square, select Rectangle and drag the pointer while holding down the Shift key.
  3. Once a shape is selected, you can change its appearance by doing one or more of the following:
    • To change the line style, in the group Figures click Circuit and select a line style.
    • Circuit and select Without outline.
    • Size and select line size (thickness).
    • In Group Colors click Color 1 and select the outline color.
    • In Group Colors click Color 2
    • Figures click Fill and select a fill style.
    • Fill and select No fill.

Polygon

Polygon Tool used when you need to create a shape with any number of sides.

  1. On the tab home in Group Figures click tool Polygon.
  2. To draw a polygon, drag the pointer to draw a straight line. Click each point where you want to mark the sides of the polygon.
  3. To create sides with 45 or 90 degree angles, hold down the Shift key while creating the sides of the polygon.
  4. To complete the polygon drawing and close the shape, connect the last and first line of the polygon.
  5. Once a shape is selected, you can change its appearance by doing one or more of the following:
  6. To change the line style, in the group Figures click Circuit and select a line style.
    • To change the line style, in the group Figures click Circuit and select a line style.
    • If the shape doesn't need an outline, click Circuit and select Without outline.
    • To resize the outline, click Size and select line size (thickness).
    • In Group Colors click Color 1 and select the outline color.
    • In Group Colors click Color 2 and select a color to fill the shape.
    • To change the fill style, in the group Figures click Fill and select a fill style.
    • If the shape doesn't need a fill, click Fill and select No fill.

Adding text in Paint

In the Paint program on a drawing you can add text or message.

Text

The Text tool is used when you need to write on an image.

  1. On the tab home in Group Service click tool Text.
  2. Drag to the area of ​​the drawing area where you want to add text.
  3. In chapter Service for working with text on the tab Text select font, size and style in group Font.
  4. In Group Colors click Color 1 and select a text color.
  5. Enter the text you want to add.
  6. (Optional) To add a background fill to a text area in a group Background select Opaque. In Group Colors click Color 2 and select a background color for the text area.

Quick work with Paint

To quickly access the commands you use most often in Paint, you can place them in the Quick Access Toolbar above the Ribbon.

To add a Paint command to the Quick Access Toolbar, right-click the button or command and select Add to Quick Access Toolbar.

Selecting and editing objects

When working with Paint You may need to change part of the image or object. To do this, you need to select the part of the image that needs to be changed and change it.

Here are some actions you can perform: resizing an object, moving, copying or rotating an object, cropping a picture to show only the selected part.

Selection

The Selection tool is used to select the part of the image that you want to change.

  1. On the tab home in Group Image Selection.
  2. Do one of the following, depending on what you want to highlight:
    • To select any square or rectangular portion of the image, select Selecting a rectangular fragment and drag the selection to the desired part of the image.
    • To select any irregularly shaped part of the image, select Selecting an arbitrary fragment and drag the pointer to highlight the part of the image you want.
    • To select the entire image, select Select all.
    • To select the entire image except the selected area, select Invert selection.
    • To delete the selected object, click the Remove or Delete button.
  3. Make sure Color 2 (background) is included in the selected elements by doing the following:
    • To enable background color for selected items, clear the checkbox Transparent selection. After pasting selected elements, the background color is turned on and will become part of the pasted element.
    • To make the selection transparent, without the background color, select the checkbox Transparent selection. After inserting a selection, any areas with the current background color will become transparent, making the rest of the image look harmonious.

Trimming

The Crop tool is used to crop an image to show only the selected portion of it. By cropping, you can change an image so that only the selected object or person is visible.

  1. On the tab home in Group Image click the arrow in the list Selection and select the selection type.
  2. To highlight the part of the image that you want to keep, drag the pointer over it.
  3. In Group Illustrations select Trimming.
  4. To save the cropped image as a new file, click the Paint button, select Save as and the file type for the current image.
  5. In field File name enter a file name and click the Save button.
  6. Storing a cropped image in a new file will help avoid overwriting the original image.

Turn

Rotate tool used to rotate the entire image or a selected part.

Depending on what you need to return, do one of the following:

  • To rotate all images, on the tab home in Group Image Click Rotate and choose a rotation direction.
  • To rotate an object or image fragment, on the home in Group Image click topic. Drag to select an area or object, click Rotate, and choose a rotation direction.

Removing part of an image

The Eraser tool is used to remove an area of ​​an image.

  1. On the tab home in Group Service click tool Eraser.
  2. Click the button Size Select the eraser size and drag the eraser over the area of ​​the image you want to remove. All removed areas will be replaced background color (color 2).

Resizing an image or part of it

Resize Tool used to resize an entire image, an object, or part of an image. You can also change the angle of an object in the image.

Resize the entire image

  1. On the tab home in Group Image click Change of size.
  2. In the dialog box Changing the size and tilt check the box Maintain proportions so that the resized image maintains the same proportions as the original image.
  3. In area Resize select Pixels Horizontally or new height in the field Vertically Maintain proportions

For example, if the image size is 320x240 pixels and you need to reduce this size by half, while maintaining the proportions, in the area Resize check the box Maintain proportions and enter the value 160 in the field Horizontally. The new image size is 160 x 120 pixels, that is, half the size of the original.

Resizing part of an image

  1. On the tab, click Select
  2. On the tab home in Group Image click Resize.
  3. In the dialog box Changing the size and tilt check the box Maintain proportions so that the scaled part has the same proportions as the original part.
  4. In area Resize select Pixels and enter the new width in the field Horizontally or new height in the field Vertically. Click OK. If checkbox Maintain proportions installed, you just need to enter the value “horizontally” (width) or “vertically” (height). Another field in the Resize area updates automatically.

Resizing the drawing area

Do one of the following, depending on how you want to resize the drawing area:

  • To increase the size of the drawing area, drag one of the small white squares on the edge of the drawing area to the desired size.
  • To resize the drawing area to a specific value, click the Paint button and select Properties. In the fields Width And Height Enter the new width and height values ​​and click OK.

Object tilts

  1. On the tab, click Select and drag to select an area or object.
  2. Click the button Change of size.
  3. In the dialog box Changing the size and tilt enter the value of the angle of inclination of the selected area (in degrees) in the fields Horizontally And Vertically in area Tilt (degrees) and click OK.

Moving and copying objects in Paint

Once an object is selected, it can be cut or copied. This will allow you to use the same object multiple times in an image, or move the object (when selected) to another part of the image.

Cut and paste

The Clip tool is used to cut out a selected object and paste it to another part of the image. After cutting out the selected area, it will be replaced with the background color. Therefore, if the image has a solid background color, you may need to change the Color 2 on background color.

  1. On the tab home in Group Image click Selection and drag the pointer to highlight the area or object you want to cut.
  2. In Group Clipboard click Cut(combination Ctrl + C).
  3. Insert(combination Ctrl + V).

Copy and paste

The Copy tool is used to copy a selected object in Paint. This is convenient if you need to increase the number of identical lines, shapes or text fragments in a picture.

  1. On the tab home in Group Image click Selection and drag the pointer to highlight the area or object you want to copy.
  2. In Group Clipboard click Copy(combination Ctrl + C).
  3. In the Clipboard group, click Insert(combination Ctrl + V).
  4. Once the object is selected, move it to a new location in the image.

Inserting an image into Paint

To paste an existing image into Paint, use the command Paste from. Once you insert an image file, you can edit it without changing the original image (unless the edited image is saved with a different file name than the original image).

  1. In Group Clipboard click the down arrow in the list Insert select item Paste from.
  2. Find the image you want to insert into Paint, select it, and click the Open button.

Working with color in Paint

The Paint program has a number of special tools for working with color. This allows you to use exactly the colors you need while drawing and editing in Paint.

Palettes

The color fields indicate the current color 1(foreground color) and color 2(background color). Their use depends on what you are doing in Paint.

At working with the palette You can do one or more of the following:

  • To change the selected foreground color, on the tab home in Group Colors click Color 1 and select a square with a color.
  • To change the selected background color, on the tab home in Group Colors click Color 2 and select a square with a color.
  • To draw with the selected foreground color, drag the pointer.
  • To draw with the selected background color, hold down the right mouse button while dragging the pointer.

Color palette

The Color Picker tool is used to set the current foreground or background color. By choosing a color in the picture, you can be sure that exactly the color that is needed to work with the image in Paint will be used.

  1. On the tab home in Group Service click tool Color palette.
  2. Select a color in the picture to make the foreground color, or right-click a color in the picture to make the background color.

Fill

The Fill tool is used when you want to fill an entire image or subshape with color.

  1. On the tab home in Group Service click tool Fill.
  2. In Group Colors click Color 1, select a color and click inside the area to fill.
  3. To remove a color or replace it with the background color, click Color 2, select a color and right-click inside the area to fill.

Editing colors

The Color Editing tool is used when you need to select a new color. Mixing colors in Paint allows you to choose exactly the color you need.

  1. On the tab home in Group Colors click tool Editing colors.
  2. In the dialog box Editing colors Select a color from the palette and click OK.
  3. The color will appear in one of the palettes and can be used in Paint.

View images and photos in Paint

Different image viewing modes in Paint allow you to choose how you want to work with the image. You can zoom in on a single section of an image or the entire image. Conversely, you can scale the image down if it is too large. In addition, while working in Paint, you can display rulers and a grid, which will make working in the program easier.

Magnifier

The Magnifier tool is used to magnify a specific part of an image.

  1. On the tab home in Group Service click tool Magnifier, move it and click on a portion of the image to zoom in.
  2. Drag the horizontal and vertical scroll bars at the bottom and right of the window to move the image.
  3. To zoom out, right-click Magnifier.

Zoom in and out

Tools Increase And Decrease are used to zoom in or out. For example, to edit a small portion of an image, you may need to enlarge it. Alternatively, the image may be too large for the screen and will need to be scaled down to view the entire image.

IN Paint program There are several different ways to enlarge or reduce an image, depending on the desired result.

  • For increase on the tab View in Group Scale select Increase.
  • For decrease on the tab View in Group Scale select Decrease.
  • For view the image in actual size on the tab View in Group Scale select 100% .

Advice: To zoom in and out of an image, you can use the Zoom In or Zoom Out buttons on the zoom slider located at the bottom of the Paint window.

Zoom slider

Rulers

The Ruler tool is used to display a horizontal ruler at the top of the drawing area and a vertical ruler at the left of the drawing area. Rulers help you see the dimensions of an image better, which can be useful when resizing an image.

  1. To display rulers, on the tab View in Group Show or hide select the Ruler checkbox.
  2. To hide the rulers, clear the Rulers check box.

Net

The Grid Line tool is used to align shapes and lines as you draw. The grid helps you understand the dimensions of objects as you draw, and also helps you align objects.

  • To display the grid, on the tab View in Group Show or hide Select the Grid lines check box.
  • To hide grid lines, clear the Grid Lines check box.

In full screen

Full Screen mode is used to view the image in full screen mode.

  1. To view the image in full screen, on the tab View in Group Display select Full screen.
  2. To exit this mode and return to the Paint window, click the image.

Saving and working with images

When editing in Paint, save the changes you make to an image regularly so you don't accidentally lose it. Once the image is saved, it can be used on your computer or shared with others via email.

Saving an image for the first time

The first time you save a drawing, you need to provide it with a file name.

  1. In field Save as and select the type of format required.
  2. In field File name enter a name and click the Save button.

Opening an image

In Paint, you can not only create a new image, but also open and edit an existing image.

  1. Click the Paint button and select Open.
  2. Find the image you want to open in Paint, select it, and click the Open button.

Using an image as a desktop background

You can also set the image as your computer desktop background.

  1. Click the Paint button and select Save.
  2. Click the Paint button, hover over the Set as desktop background and select one of the desktop background options.

Sending an image by email

If you have an email program installed and configured, send images as attachments to an email message and share them with others via email.

  1. Click the Paint button and select Save.
  2. Click the Paint button and select Submit.
  3. In an email, enter the recipient's address, write a short message, and send the email with an image attached.

Color selection

The active brush color (primary color) is changed by clicking the left mouse button, the active background color is changed by clicking the right mouse button.

Lines, curves, and contours of shapes are drawn with the color of the brush, and fill, spray, brush, and pencil also work in this color. The cavities of the figures are colored with the background color. The eraser, when erasing the drawing, leaves behind the background color.

Color change

The color panel holds 28 colors. If necessary, you can replace the color in the palette with another: double-click on the color to be replaced or Palette - “Change palette”, then in the “Change palette” window - select the desired color (from 48 colors).

The computer allows you to work with millions of colors. Therefore, if you need a color that does not exist, you can create it yourself - the “Define color” command

In addition to “manual” selection, a color can be determined by its code – “Hue, Contrast, Brightness” or “Red, Green, Blue”.

After setting a color, you can add it to the set of additional colors or change it in the palette (OK)

Task "Coloring"

1. Launch Paint. Set the sheet size to 585 x 640.

2. Insert a picture from the file “drawings\hare.bmp” (Edit – Insert from File)


3. Using RGB color codes, color the picture according to the sample. Try to paint over the outlines of the areas as well. One way is to paint the area first with black, then with the desired color. Another way is to set the desired color as the background color, black as the brush color and, using the colored eraser (i.e. holding the right mouse button), replace the color.

4. Save the drawing in your folder under the name “2-hare.bmp”

5. Create a new drawing (File – New)

6. Insert a picture from the file “drawings\bird.bmp”

7. Color it as desired and save it in your folder under the name “2-bird.bmp”

Questions

1) What color will you get if you mix equal amounts of red, green and blue?

2) What color will you get if you mix equal amounts of red and blue?

3) How to get black and white color?

4) What color corresponds to the RGB(0,0,250) code?

I have a suspicion that the pictures you showed us last time were not drawn in Paint! Vasya looked at Shurik with annoyance.

Why did you decide this?

I wanted to replicate these designs, but couldn't find the right colors! For the picture with material samples, I found only two suitable colors in the Paint palette, not counting white and black:

The color panel in Paint holds 28 colors. However, there are millions of computer colors you can use to paint!

Wow! But where do you get these colors?

Color selection

You can “take paint” from the finished drawing using a tool Choice of colors:

The cursor takes the form of an eyedropper:

Paint for the main color (left-click) and background color (right-click) is drawn into the eyedropper from the desired area of ​​the drawing:

What if you don’t have a picture with the right colors at hand?

Main palette

You can replace any color in the working palette with one of the 48 colors in the main palette.

Color replacement algorithm


The main palette contains only 48 colors. And you said that you can use millions of computer colors in the editor!

That's how it is! Look: under the main palette in the window Changing the palette there is an area Additional colors with 16 empty “paint boxes”. They can be filled with any colors that the computer can construct.

How to do this?

Additional colors

Needed in the window Changing the palette press the button Define color. In the expanded window, tools for setting a new color appear:

First we determine the color by dragging the mouse color selection engine, then set the color brightness to triangular brightness selection engine. The result shows a rectangle color indicator.

Correct. Thus, for example, you can get a set of gray paints to give volume to the image of a metal pipe:

I noticed that the smaller the diameter of the pipe, the more it looks like the real thing!

Five colors are used on all pipes to add volume. The white stripe in the center creates the effect of maximum illumination. Gray colors with decreasing brightness simulate the distance of the surface from the light source.

The brightness of the color should decrease gradually from the center to the edges. For a “narrow” pipe, four gray steps are enough. For “wide” you need to take more colors so that the color transitions are smooth.

How to work with a palette of additional colors?

Replacing a color in the editor's working palette with a color from the main or additional palette is performed in the same way, but these colors disappear as soon as the editor window is closed.

Fill

On the editor toolbar there is a funny icon with a picture of a jar. What's in it? A refreshing drink for a tired artist?

This tool is called Fill. It is intended for painting closed areas of a drawing.

When you select this tool, the cursor takes the shape of a jar with paint flowing out. The tip of the colored jet needs to get inside the area to be painted.

By left-clicking the area is painted in the foreground color, and by right-clicking it is colored by the background color.

When working with the tool, you must carefully monitor the closedness of the area being painted: paint can “leak” out through a one-pixel hole:

Why is the grass green

Why is the grass green and the sand yellow?

Because grass reflects green, but other colors do not. Because sand reflects yellow, but the rest does not.

How can grass reflect green color, and sand yellow, if they are illuminated not by green, not yellow, but white?

As you know, white color is a mixture of all colors. This is easy to see if you pass it through a glass prism. Since different colors have different refraction angles, we will see all the components of white separately. Conventionally, these colors are divided into seven groups (colors of the rainbow):

Just don’t think that white consists of seven colors! It’s just that all shades of red, orange, yellow, green, blue, indigo and violet are collected into seven groups. And in the figure, each group is conventionally depicted in one “pure” color.

This means that the grass reflects only one component of the white color green, and it falls into our eyes. What happens to the rest of the flowers?

The grass absorbs the remaining colors.

Does sand absorb all colors except yellow?

Correct. The sand reflects the yellow color, and this is how we see it.

How does the human eye distinguish colors?

Light hits the light-sensitive cells of the eye (retina). These nerve cells are divided into cones And sticks. Rods are responsible for black-and-white evening and night vision, and cones are responsible for color vision.

Cones, in turn, are divided into three groups: “red” (perceive only red color), “green” (perceive only green color), “blue” (perceive only blue color).

Information from the cones enters the optic nerve, where it is summed up, and a person sees color as a mixture of red, green and blue components.

It turns out that any color is obtained by mixing three colors: red, green and blue?

I mixed these colors and got almost white!

It all depends on the proportions in which these paints are taken.

By mixing red, green and blue paint in equal quantities, we get white. A mixture of red and green paint produces yellow.

Equal amounts of red and blue ink produce magenta, and equal amounts of green and blue produce cyan:

If you take blue paint and 75% of it red, you get a purple mixture. Orange color consists of equal amounts of green and blue paint and 30% red:

I remembered: a color image on a monitor screen is also obtained by mixing colors! Each pixel consists of three grains of phosphor: red, green and blue. This means that the creators of the color screen simply copied the structure of the human eye!

Computer colors

Color coding using three components red, green and blue is indeed accepted in computer science and is called RGB (from R ed red, G reen green, B lue blue).

I have heard that different monitors can produce different numbers of colors on the screen.

The number of possible colors on a computer screen depends both on the physical characteristics of the monitor itself and on the amount of memory located on the video card. As a rule, the monitor can be configured for different operating modes.

Let's take a closer look at this issue.

Let each of the three formative colors either participate in the formation of color or not. Then, to encode the intensity of red, green or blue, two values ​​are enough: 0 there is no color, 1 there is color. With this encoding, a palette of 8 colors is obtained:

The number 8 (monitor color) is obtained by multiplying three twos, each of which indicates the number of intensity options for the component colors: 8 = 2 2 2.

A “black” pixel (the absence of red, green and blue components) has the color of the monitor screen when it is turned off.

Let's now determine the size of video memory required for an 8-color monitor with a resolution of 640x480.

We'll have to start multiplying again! Each component color requires one bit to be encoded (0 no color, 1 color present). This means that each pixel will require 3 bits to encode all three of its RGB colors.

It turns out that such a monitor requires a memory of 3 640 480 = 921 600 bits.

In bytes this is: 921,600 / 8 = 115,200 bytes. Considering that there are 1024 bytes in one kilobyte, we find that 113 KB of video memory will be enough (115,200 / 1024 = 112.5).

Let's look at the general rules for calculating monitor color and the size of video memory required for the monitor to operate at a given resolution.

Monitor color calculation

A colored spot is obtained by superimposing the RGB rays of three spotlights:

Let each spotlight have two states: off and on.

How many colors can such projectors create on the screen?

If there is only one spotlight, then it creates two colors (one of them is black):

Now let there be two spotlights. In each state of the first, the second can be turned off or on:

It turns out that with two spotlights you can get 4 colors: each of the two states of the first spotlight is “multiplied” by two states of the second.

Let's add a third spotlight. Each of its states provides 4 colors by changing the states of the other two spotlights. This means that with three spotlights you can get 8 colors (2 4):

We see that color is calculated by multiplying three numbers that specify the number of possible states for each spotlight.

Let the number of intensity options for each RGB component be equal to k. We obtain a universal formula for calculating chromaticity C:

C = k · k · k = k 3

Calculating video memory size

First, let's determine how many bits are needed to encode k states of one RGB component.

Let k = 2 (spotlight off, spotlight on). To encode these spotlight states, one bit is enough:

For k = 3, 2 bits are required:

Two bits are enough for encoding and four states:

But to encode 5 states, two bits are not enough:

Note that the number of bits required to encode k states is equal to the number of binary digits in the binary representation of the number (k-1).

Algorithm for calculating video memory size

Let the monitor operate at w x h resolution, and each RGB component can be in one of k states. Determine the size of the required video memory.

  1. Let's determine the number of bits to encode one component. To do this, we write the number k-1 in binary code and count the number of resulting binary digits b.
  2. Let's determine the number of bits required to encode one pixel:

    P = 3 b (3-component coding)

  3. Let's determine the video memory size:

    V = p w h

Example

Let's calculate the required video memory size for a resolution of 640x480 if each RGB component has 6 intensity levels.

Given: k = 6 w = 640 h = 480

  1. Let's determine the number of bits to encode one component. To do this, write the number k-1 = 5 in binary code and calculate the resulting number of binary digits: 5 = 101 b = 3
  2. Let's determine the number of bits required to encode one pixel: p = 3 3 = 9 bits
  3. Let's determine the size of video memory: V = 9 640 480 = 2,764,800 bits = 345,600 bytes

Monitor operating modes

My monitor’s color palette settings say True Color (24 bits). What does this mean?

The English expression True Color translates as natural colors. Each component RGB color is encoded in this palette with 8 bits. For three colors, 24 bits per pixel is obtained.

How many gradations of color intensity can be encoded with 8 bits?

Eight bits can encode numbers from 0 to 255, that is, a total of 256 values ​​can be encoded.

Below are examples of 8 colors from the 24-bit palette. Next to each color the values ​​of its RGB components are indicated. The binary 8-bit code and the decimal number corresponding to this code are specified.

Here's a task for you: calculate how many colors there are in a 24-bit palette, and how much video memory is required to store a full monitor screen with a resolution of 640x480.

The number of colors is determined by multiplying the number of RGB component options. It turns out: 256 · 256 · 256 = 16,777,216.

Oh-ho-ho! Over 16 million colors!

Now let's calculate the amount of video memory: 24 640 480 = 7,372,800 bits.

In kilobytes this works out: 7,372,800 / 8 / 1024 = 900 KB.

Color design

When designing a new color in a graphics editor, you can work with the color and brightness engines, or you can write down the numerical values ​​of the RGB components in the input boxes:

What do three more windows with inscriptions mean? Hue, Contrast And Brightness?

The numbers in these boxes describe the color in another coding system HSB (from H ue hue, hue; S aturation saturation, contrast; B rightness brightness).

Selecting colors using sliders in the window Changing the palette exactly matches the HSB color model. Moving the color slider horizontally changes shade(H), vertical contrast(S). Moving the triangular slider (along a separate vertical ruler) changes brightness(B).

Hue (tone) is the color of the rainbow.

Contrast (saturation) is the content of gray impurities in a color. The color of maximum saturation contains no gray at all, and at zero saturation all colors are gray.

Brightness is the intensity with which a color is emitted. At maximum brightness, all colors turn into white, at zero into black.

Selecting a color using the HSB system is, of course, easier than specifying it as an RGB component! First, you select a color on the rainbow (from left to right), then you set its contrast (from top to bottom), and then you set the brightness using a separate slider.

  1. How can you “take away” color from a finished drawing?
  2. How to paint over a closed area?
  3. What happens when the outline of the area being painted has a gap?
  4. Explain the algorithm for replacing the color of the working palette with a color from the main or additional palette.
  5. Why is the grass green and the sand yellow?
  6. What happens if white light is passed through a glass prism?
  7. Is it true that a rainbow consists of 7 colors?
  8. Explain the structure of the human eye.
  9. Which nerve cells are responsible for black-and-white, twilight vision?
  10. Which nerve cells are responsible for color vision?
  11. How is color information generated in the optic nerve?
  12. What color will you get if you mix red, green and blue ingredients?
  13. What color will you get if you mix equal amounts of pure red, green and blue?
  14. What color will you get if you mix equal amounts of pure red and pure green?
  15. What color will you get if you mix equal amounts of pure green and pure blue?
  16. What color will you get if you mix equal amounts of pure red and blue?
  17. What is the name of the color coding system in a computer?
  18. How is color specified in the RGB coding system?
  19. Name the colors of the 8-color palette and their binary codes.
  20. How are black and white colors produced on a computer screen?
  21. Why is it recommended to pay attention to the color of the screen when it is turned off when choosing a monitor?
  22. What is a monitor's color palette?
  23. What determines the number of bits needed to encode the color of one pixel?
  24. What is stored in the computer's video memory?
  25. What determines the size of video memory required to display a color image on the screen?
  26. How to calculate the required video memory size?
  27. How to calculate the color of a monitor if the number of RGB component intensity options is given?
  28. What is the name of the color coding system on which the color selection interface in the graphics editor is built?
  29. How is color specified in the HSB coding system?
  30. What is hue, saturation (contrast) and brightness of color?
  31. Explain the algorithm for constructing colors using the HSB interface.

Option 1

    How much memory (in bits) would be required to encode the color of one pixel on a black and white monitor (without halftones)? How can you encode the state of a pixel?

    A black-and-white monitor displays only two-color images with a resolution of 640x200. What is the minimum size in bytes that video memory should have to store such an image?

    The following table shows the encoding of an 8-color palette using three-bit binary code:

    Use the table to determine which colors are mixed to create a color:

    • blue,
    • pink,
    • yellow,
    • black?

Option 2

  1. Explore the possible settings of your home monitor palette and resolution (right click on Desktop, then from the context menu select Properties, tab Settings, drop-down list Color palette and slider Screen area). Write down the values ​​from the list and from the slider.

    Based on the detected data, calculate the minimum and maximum amount of video memory in KB and MB that is used when operating your monitor.

Option 3








2024 gtavrl.ru.