-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
4 changed files
with
28 additions
and
4 deletions.
There are no files selected for viewing
Binary file added
BIN
+39.9 KB
...одирование информации/Цвет/Кодирование цвета.assets/image-20220716150843671.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+5.82 KB
...одирование информации/Цвет/Кодирование цвета.assets/image-20220716152037529.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
# Кодирование цвета | ||
|
||
Для того чтобы компьютер имел возможность работать с цветными изображениями, необходимо представлять цвета в виде чисел — кодировать цвет. Способ кодирования зависит от цветовой модели. | ||
|
||
## Модель RGB | ||
|
||
**RGB** (**R**ed, **G**reen, **B**lue) — аддитивная цветовая модель, где каждый цвет представляется суммой трех базовых: *красного*, *зеленого* и *синего*. Каждый из этих базовых цветов сопоставляется с однобайтовым числом (всего $2^8=256$ значений). $0$ соответствует отсутствию цвета (черный цвет), $255$ соответствует максимальной насыщенности базового цвета. | ||
|
||
<figure markdown> | ||
![Сложение в RGB](Кодирование цвета.assets/image-20220716150843671.png) | ||
<figcaption>Сложение в RGB</figcaption> | ||
</figure> | ||
Для записи результирующего цвета используется шаблон `#RRGGBB`, где `RR` — шестнадцатеричное число для красного цвета, `GG` — для зеленого, `BB` — для синего. Можно записывать цвет как большими так и маленькими цифрами. | ||
|
||
<figure markdown> | ||
![Запись цвета RGB](Кодирование цвета.assets/image-20220716152037529.png) | ||
<figcaption>Запись цвета в RGB</figcaption> | ||
</figure> | ||
|
||
|
||
Модель RGB позволяет определить $2^{24}=16\ 777\ 216$ цветов. | ||
|
||
## Список использованных источников | ||
|
||
1. RGB [Электронный ресурс] URL: [https://ru.wikipedia.org/wiki/RGB](https://ru.wikipedia.org/wiki/RGB) (дата обращения: 16.07.2022) | ||
1. Кодирование цветов [Электронный ресурс] URL: [https://libraryno.ru/5-3-kodirovanie-cvetov-sredotobrinf/](https://libraryno.ru/5-3-kodirovanie-cvetov-sredotobrinf/) (дата обращения: 16.07.2022) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters