Как изменить цвет фона cmd

Are you bored of the plain white text on black background in cmd? If yes then read on to know how to change the text colour and the background colour. Press windows + R to open run.


Download Article


Download Article

Are you bored of the plain white text on black background in cmd? If yes then read on to know how to change the text colour and the background colour.

  1. Image titled Change Colours in Command Prompt Step 1

    1

    Press windows + R to open run.

  2. Image titled Change Colours in Command Prompt Step 2

    2

    Type ‘cmd’ (without the quotes) and click ok.

    Advertisement

  3. Image titled Change Colours in Command Prompt Step 3

    3

    Type color z to get the list of all colors and numbers or letters assigned for them. The first letter/number in the command is the colour of the background and the second is the colour of the text.

  4. Image titled Change Colours in Command Prompt Step 4

    4

    Type color letter/number to change the text color. Use the letter/number for the color you want. e.g. Type ‘color 6’ to have yellow text, ‘color 4’ to have red text, ‘color A’ to have light green text etc. ( Ignore all quotes )

  5. Image titled Change Colours in Command Prompt Step 5

    5

    To change the colour of the text as well as the background, type ‘color ce’ ( without the quotes ) to have light yellow text on a light red background or any other combination.

  6. Advertisement

  1. Image titled Change Colours in Command Prompt Step 6

    1

    Open Command Prompt.

  2. Image titled Change Colours in Command Prompt Step 7

    2

    Right-click on the top.

  3. Image titled Change Colours in Command Prompt Step 8

    3

    Click on Properties.

  4. Image titled Change Colours in Command Prompt Step 9

    4

    Go to the Colors tab.

  5. Image titled Change Colours in Command Prompt Step 10

    5

    Select text or background and edit the color values.

    • Play around with the combinations!
  6. Image titled Change Colours in Command Prompt Step 11

    6

    Click ok to apply changes.

  7. Advertisement

Add New Question

  • Question

    Can I color certain letters or words?

    Community Answer

    Yes. Right click on the tab or image, then go to properties, then go to color and you can change the background color and the letters.

  • Question

    How do I do this in a specific batch file?

    Flashlight

    Flashlight

    Community Answer

    Simply type the same command line code you used into the batch before echoing.

  • Question

    How do I change my command prompt color to a rainbow color?

    CaTsArEsOcUtE

    I do not think there is a way to change it to rainbow color.

See more answers

Ask a Question

200 characters left

Include your email address to get a message when this question is answered.

Submit

Advertisement

Video

List of Possible Colors

  • 0 = Black
  • 1 = Blue
  • 2 = Green
  • 3 = Aqua
  • 4 = Red
  • 5 = Purple
  • 6 = Yellow
  • 7 = White
  • 8 = Gray
  • 9 = Light Blue
  • A = Light Green
  • B = Light Aqua
  • C = Light Red
  • D = Light Purple
  • E = Light Yellow
  • F = Bright White
  • Be careful of the spellings of ‘color’ and do not type ‘colour’. Otherwise it will not work.

Thanks for submitting a tip for review!

Advertisement

About This Article

Thanks to all authors for creating a page that has been read 405,741 times.

Is this article up to date?


Download Article


Download Article

Are you bored of the plain white text on black background in cmd? If yes then read on to know how to change the text colour and the background colour.

  1. Image titled Change Colours in Command Prompt Step 1

    1

    Press windows + R to open run.

  2. Image titled Change Colours in Command Prompt Step 2

    2

    Type ‘cmd’ (without the quotes) and click ok.

    Advertisement

  3. Image titled Change Colours in Command Prompt Step 3

    3

    Type color z to get the list of all colors and numbers or letters assigned for them. The first letter/number in the command is the colour of the background and the second is the colour of the text.

  4. Image titled Change Colours in Command Prompt Step 4

    4

    Type color letter/number to change the text color. Use the letter/number for the color you want. e.g. Type ‘color 6’ to have yellow text, ‘color 4’ to have red text, ‘color A’ to have light green text etc. ( Ignore all quotes )

  5. Image titled Change Colours in Command Prompt Step 5

    5

    To change the colour of the text as well as the background, type ‘color ce’ ( without the quotes ) to have light yellow text on a light red background or any other combination.

  6. Advertisement

  1. Image titled Change Colours in Command Prompt Step 6

    1

    Open Command Prompt.

  2. Image titled Change Colours in Command Prompt Step 7

    2

    Right-click on the top.

  3. Image titled Change Colours in Command Prompt Step 8

    3

    Click on Properties.

  4. Image titled Change Colours in Command Prompt Step 9

    4

    Go to the Colors tab.

  5. Image titled Change Colours in Command Prompt Step 10

    5

    Select text or background and edit the color values.

    • Play around with the combinations!
  6. Image titled Change Colours in Command Prompt Step 11

    6

    Click ok to apply changes.

  7. Advertisement

Add New Question

  • Question

    Can I color certain letters or words?

    Community Answer

    Yes. Right click on the tab or image, then go to properties, then go to color and you can change the background color and the letters.

  • Question

    How do I do this in a specific batch file?

    Flashlight

    Flashlight

    Community Answer

    Simply type the same command line code you used into the batch before echoing.

  • Question

    How do I change my command prompt color to a rainbow color?

    CaTsArEsOcUtE

    I do not think there is a way to change it to rainbow color.

See more answers

Ask a Question

200 characters left

Include your email address to get a message when this question is answered.

Submit

Advertisement

Video

List of Possible Colors

  • 0 = Black
  • 1 = Blue
  • 2 = Green
  • 3 = Aqua
  • 4 = Red
  • 5 = Purple
  • 6 = Yellow
  • 7 = White
  • 8 = Gray
  • 9 = Light Blue
  • A = Light Green
  • B = Light Aqua
  • C = Light Red
  • D = Light Purple
  • E = Light Yellow
  • F = Bright White
  • Be careful of the spellings of ‘color’ and do not type ‘colour’. Otherwise it will not work.

Thanks for submitting a tip for review!

Advertisement

About This Article

Thanks to all authors for creating a page that has been read 405,741 times.

Is this article up to date?

Многие пользователи Windows даже не подозревают о всех способностях этой операционной системы, когда дело касается настройки пользовательского интерфейса. Сегодня мы хотим рассказать о том, как поменять цвет в командной строке со стандартного на любой другой.

Кто-то из пользователей вообще не пользуется командной строкой, а кто-то использует ее постоянно. Категория последних пользователей знает, что стандартные цвета довольно скучные и очень быстро надоедают. В стандартном исполнении командная строка имеет черный фон и белый шрифт.

Как поменять цвет в командной строке?

Чтобы поменять cmd, можно воспользоваться двумя способами:

  • можно использовать специальные инструкции внутри командной строки;

  • можно использовать пользовательский интерфейс.

Как поменять цвет в командной строке при помощи инструкций

В данном случае алгоритм действий такой:

  1. Откройте командную строку любым удобным способом. Это можно сделать через основное меню или через командное окно «Выполнить», если ввести в нем команду: «cmd».

  2. В командной строке введите команду: «color -help». С помощью этой команды вы выведите список доступных цветов, поддерживаемых командной строкой. Но самое главное, что каждому цвету будет закреплено обозначение в виде цифры и буквы латинского алфавита.

  3. После того как вы определитесь с идентификаторами цветов для шрифта и фона, можете в командной строке задать команду, которая сменит цвета. Команда строится по такому шаблону: «color <идентификатор цвета фона> <идентификатор цвета шрифта>». 

К примеру команда может выглядеть так:

  • «color 46» будет задан красный фон и желтый цвет текста;

  • «color 02» будет задан черный фон и зеленый цвет текста;

  • «color 24» будет задан зеленый фон и красный цвет текста;

  • и другие комбинации.

Как видно, ничего сложного в таком способе изменить цвет командной строки нет, однако он может показаться сложным. Поэтому можно использовать другой способ — задействовать пользовательский интерфейс командной строки.

Как поменять цвет командной строки с помощью пользовательского интерфейса

В данном случае алгоритм действий будет следующий:

  1. Запустите командную строку любым удобным способом.

  2. Кликните по рамке командной строки правым кликом мыши, чтобы вызвать меню.

  3. В открывшемся меню выберите пункт «Свойства», чтобы вам открылось дополнительное окно настройки.

  4. В открывшемся окне настроек выберите вкладку «Цвета». В этой вкладке можно будет поменять цвет фона и текста командной строки. Причем, все доступные цвета будут располагаться тут же. Вам останется только выбрать что вы хотите отредактировать: фон или шрифт и определить им цвет. Тут же будет располагаться небольшое демонстрационное окно, где вы сможете сразу увидеть созданную комбинацию цветов в деле. 

  5. После всех манипуляций нужно будет сохранить изменения. 

Заключение

После прочтения этой статьи до конца, перед вами уже не будет стоять вопрос, как поменять цвет фона или текста командной строки. Если вы отлично дружите с командной строкой, тогда можете воспользоваться первым способом, который состоит специальны командных инструкций. Если вам «ближе» пользовательский интерфейс, тогда можете поменять цвет в cmd вторым способом.

Color is an inbuilt command found inside the Windows Command Processor (cmd.exe), that is used for changing the colors for the console’s foreground and background. By default, the console has white foreground color and black background color (07 color code). The command is generally used either to personalize the aesthetics of the console window, or the make the colors more appropriate for Dim or Dark Displays (ex. TN panels). In this article, we will learn about the color command and will also take a look at the various uses it offers.

Description of the Command :
Type the command – color /? in the Command Prompt.

It sets the default console foreground and background colors.

COLOR [attr]
attr - Specifies the color attribute of console output.

Color attributes are specified by two hex digits –

  • First corresponds to the background.
  • Second corresponds to the foreground.

Using the Command :
The command takes in input 2 hexadecimal digits (2nd digit optional) where the first digit corresponds to the background color and the second digit corresponds to the foreground color.

Syntax :

Color (Background)(Foreground)

If the first digit is only provided, then only the foreground color changes. Each digit can have any of the values in hexadecimal codepoint (0 – f) where each one corresponds to a unique color. The digit to color correspondence is as follows –

  0 = Black       8 = Gray
  1 = Blue        9 = Light Blue
  2 = Green       A = Light Green
  3 = Aqua        B = Light Aqua
  4 = Red         C = Light Red
  5 = Purple      D = Light Purple
  6 = Yellow      E = Light Yellow
  7 = White       F = Bright White

Syntax :

Color 1F

It will produce bright White on Dark Blue. Any combination of the above set of digits could be used, except for the special case in which the foreground and the background color is the same (Ex. color FF or color 33). In that case no color change occurs, and the value of %ERRORLEVEL% changes to 1. If the command is executed without providing any parameters, then the command will restore the color to which cmd.exe initially started as.

  1. Changing Only The Foreground Color :

    Syntax :

    Color (Hex_digit)

    (Hex_digit) is a digit (or character) within the hexadecimal range, i.e. it should belong in the range 0-F.

    Example :
    We will change the foreground color to Yellow (6).

    Before :

    After :

    It is clear from the above images that after executing the command Color 6, the color of the foreground changes from white to yellow.

  2. Changing the Color of Background And Foreground :
    For changing the color of the foreground and the background of the console window, the color attributes are specified by 2 of the previously mentioned hex digits.

    Syntax :

    color (Back_Hex_digit)(Fore_hex_digit)

    Back_Hex_digit and Fore_hex_digit are hexadecimal digits used to determine the color of the background and foreground respectively. In the following example, we will change the background color to grey (7) and foreground color to light green (a).

    Before :

    After :

Командная строка WindowsПо умолчанию командная строка Windows располагает чёрным фоном с текстом белого цвета, который располагается на нём. Если такие оформление вам надоело, то, как ни странно, это можно изменить без особых усилий.

Конечно, можно изменить данные настройки через графический интерфейс системы (правой кнопкой мыши по рамке окна командной строкиСвойстваЦвета), но сегодня мы рассмотрим полезную команду COLOR, которая позволяет делать то же самое без дополнительных щелчков мышью.

Изменение цвета текста и фона в командной строке Windows.

Изменение цвета текста и фона в командной строке Windows.

Синтаксис команды color очень прост:

COLOR [цвет_фона][цвет_текста]

Цвета задаются шестнадцатеричными цифрами. Первая цифра отвечает за цвет фона, вторая за цвет текста. Можно использовать следующие цифры:

0 — черный;
1 — синий;
2 — зеленый;
3 — голубой;
4 — красный;
5 — лиловый;
6 — желтый;
7 — белый;
8 — серый;
9 — светло-синий;
A — светло-зеленый;
B — светло-голубой;
C — светло-красный;
D — светло-лиловый;
E — светло-желтый;
F — ярко-белый.

Указав сочетания двух цифр, мы можем задать цвет текста и фона. Например, красный на белом:

color f4

Команда COLOR: меняем цвет текста и фона в командной строке Windows

Если указать в команде одну цифру, то это будет воспринято как указание цвета текста на чёрном фоне. Например, команда

color a

даст нам светло-зеленый текст на чёрном фоне.

Команда COLOR: меняем цвет текста и фона в командной строке Windows

Следует учитывать, что данные настройки будут действовать только пока текущее окно командной строки открыто. Но что делать, если мы хотим сохранить их на постоянной основе? В этом нам помогут два параметра реестра: DefaultColor и ScreenColors.

Для начала посмотрим на DefaultColor. Его можно задать как для отдельного пользователя:

HKEY_CURRENT_USERSoftwareMicrosoftCommand ProcessorDefaultColor

так и для всех пользователей:

HKEY_LOCAL_MACHINESOFTWAREMicrosoftCommand ProcessorDefaultColor

Значение параметра из раздела пользователя (HKEY_CURRENT_USER) имеют приоритет над значением параметра для всех.

По умолчанию DefaultColor имеет значение 0x00000000. Это значит, что настройки цвета определяются другим параметром:

HKEY_CURRENT_USERConsoleScreenColors

Для установки настроек достаточно отредактировать DefaultColor или ScreenColors. Например, мы уже устанавливали красный цвет текста на белом фоне. Вписав подобное значение в реестре, можно установить эту настройку по умолчанию.

Команда COLOR: меняем цвет текста и фона в командной строке Windows

Установить одинаковые цвета текста и фона при помощи команды color нельзя. Подобная команда (например, color 55) возвратит значение кода ошибки ERRORLEVEL равное 1. Но вот через реестр Windows подобную глупость совершить можно.

Команда COLOR: меняем цвет текста и фона в командной строке Windows

Лиловый текст на лиловом фоне в командной строке.

К счастью, и возвратить всё на свои места в случае ошибки не составит труда. Напоминаю, что параметр ScreenColors по умолчанию принимает значение 0x00000007. Это белый текст на чёрном фоне.

Понравилась статья? Поделить с друзьями:

Читайте также:

  • Как изменить цвет фоамирана
  • Как изменить цвет фикуса
  • Как изменить цвет фикбука
  • Как изменить цвет фигуры tkinter
  • Как изменить цвет фасадной краски

  • 0 0 голоса
    Рейтинг статьи
    Подписаться
    Уведомить о
    guest

    0 комментариев
    Старые
    Новые Популярные
    Межтекстовые Отзывы
    Посмотреть все комментарии