Рубрики

colors

Merging which colors generate blue?

You can experiment with color ratios and blends to create different shades of brown. One example is by using more orange than blue paint.


1 Customizing Git – Git Configuration

So far, we’ve covered the basics of how Git works and how to use it, and we’ve introduced a number of tools that Git provides to help you use it easily and efficiently. In this chapter, we’ll see how you can make Git operate in a more customized fashion, by introducing several important configuration settings and the hooks system. With these tools, it’s easy to get Git to work exactly the way you, your company, or your group needs it to.

As you read briefly in Getting Started, you can specify Git configuration settings with the git config command. One of the first things you did was set up your name and email address:

$ git config --global user.name "John Doe" $ git config --global user.email [email protected]

Now you’ll learn a few of the more interesting options that you can set in this manner to customize your Git usage.

First, a quick review: Git uses a series of configuration files to determine non-default behavior that you may want. The first place Git looks for these values is in the system-wide [path]/etc/gitconfig file, which contains settings that are applied to every user on the system and all of their repositories. If you pass the option –system to git config , it reads and writes from this file specifically.

The next place Git looks is the ~/.gitconfig (or ~/.config/git/config ) file, which is specific to each user. You can make Git read and write to this file by passing the –global option.

Finally, Git looks for configuration values in the configuration file in the Git directory ( .git/config ) of whatever repository you’re currently using. These values are specific to that single repository, and represent passing the –local option to git config . If you don’t specify which level you want to work with, this is the default.

Each of these “levels” (system, global, local) overwrites values in the previous level, so values in .git/config trump those in [path]/etc/gitconfig , for instance.

Note

Git’s configuration files are plain-text, so you can also set these values by manually editing the file and inserting the correct syntax. It’s generally easier to run the git config command, though.

Basic Client Configuration

The configuration options recognized by Git fall into two categories: client-side and server-side. The majority of the options are client-side — configuring your personal working preferences. Many, many configuration options are supported, but a large fraction of them are useful only in certain edge cases; we’ll cover just the most common and useful options here. If you want to see a list of all the options your version of Git recognizes, you can run:

$ man git-config

This command lists all the available options in quite a bit of detail. You can also find this reference material at https://git-scm.com/docs/git-config.

Note

For advanced use cases you may want to look up “Conditional includes” in the documentation mentioned above.

core.editor

By default, Git uses whatever you’ve set as your default text editor via one of the shell environment variables VISUAL or EDITOR , or else falls back to the vi editor to create and edit your commit and tag messages. To change that default to something else, you can use the core.editor setting:

$ git config --global core.editor emacs

Now, no matter what is set as your default shell editor, Git will fire up Emacs to edit messages.

commit.template

If you set this to the path of a file on your system, Git will use that file as the default initial message when you commit. The value in creating a custom commit template is that you can use it to remind yourself (or others) of the proper format and style when creating a commit message.

For instance, consider a template file at ~/.gitmessage.txt that looks like this:

Subject line (try to keep under 50 characters) Multi-line description of commit, feel free to be detailed. [Ticket: X]

Note how this commit template reminds the committer to keep the subject line short (for the sake of git log –oneline output), to add further detail under that, and to refer to an issue or bug tracker ticket number if one exists.

To tell Git to use it as the default message that appears in your editor when you run git commit , set the commit.template configuration value:

$ git config --global commit.template ~/.gitmessage.txt $ git commit

Then, your editor will open to something like this for your placeholder commit message when you commit:

Subject line (try to keep under 50 characters) Multi-line description of commit, feel free to be detailed. [Ticket: X] # Please enter the commit message for your changes. Lines starting # with '#' will be ignored, and an empty message aborts the commit. # On branch master # Changes to be committed: # (use "git reset HEAD . " to unstage) # # modified: lib/test.rb # ~ ~ ".git/COMMIT_EDITMSG" 14L, 297C

If your team has a commit-message policy, then putting a template for that policy on your system and configuring Git to use it by default can help increase the chance of that policy being followed regularly.

core.pager

This setting determines which pager is used when Git pages output such as log and diff . You can set it to more or to your favorite pager (by default, it’s less ), or you can turn it off by setting it to a blank string:

$ git config --global core.pager ''

If you run that, Git will page the entire output of all commands, no matter how long they are.

user.signingkey

If you’re making signed annotated tags (as discussed in Signing Your Work), setting your GPG signing key as a configuration setting makes things easier. Set your key ID like so:

$ git config --global user.signingkey

Now, you can sign tags without having to specify your key every time with the git tag command:

$ git tag -s

core.excludesfile

You can put patterns in your project’s .gitignore file to have Git not see them as untracked files or try to stage them when you run git add on them, as discussed in Ignoring Files.

But sometimes you want to ignore certain files for all repositories that you work with. If your computer is running macOS, you’re probably familiar with .DS_Store files. If your preferred editor is Emacs or Vim, you know about filenames that end with a ~ or .swp .

This setting lets you write a kind of global .gitignore file. If you create a ~/.gitignore_global file with these contents:

*~ .*.swp .DS_Store

…and you run git config –global core.excludesfile ~/.gitignore_global , Git will never again bother you about those files.

help.autocorrect

If you mistype a command, it shows you something like this:

$ git chekcout master git: 'chekcout' is not a git command. See 'git --help'. The most similar command is checkout

Git helpfully tries to figure out what you meant, but it still refuses to do it. If you set help.autocorrect to 1, Git will actually run this command for you:

$ git chekcout master WARNING: You called a Git command named 'chekcout', which does not exist. Continuing under the assumption that you meant 'checkout' in 0.1 seconds automatically. 

Note that “0.1 seconds” business. help.autocorrect is actually an integer which represents tenths of a second. So if you set it to 50, Git will give you 5 seconds to change your mind before executing the autocorrected command.


Colors in Git

Git fully supports colored terminal output, which greatly aids in visually parsing command output quickly and easily. A number of options can help you set the coloring to your preference.

color.ui

Git automatically colors most of its output, but there’s a master switch if you don’t like this behavior. To turn off all Git’s colored terminal output, do this:

$ git config --global color.ui false

The default setting is auto , which colors output when it’s going straight to a terminal, but omits the color-control codes when the output is redirected to a pipe or a file.

You can also set it to always to ignore the difference between terminals and pipes. You’ll rarely want this; in most scenarios, if you want color codes in your redirected output, you can instead pass a –color flag to the Git command to force it to use color codes. The default setting is almost always what you’ll want.

color.*

If you want to be more specific about which commands are colored and how, Git provides verb-specific coloring settings. Each of these can be set to true , false , or always :

color.branch color.diff color.interactive color.status

In addition, each of these has subsettings you can use to set specific colors for parts of the output, if you want to override each color. For example, to set the meta information in your diff output to blue foreground, black background, and bold text, you can run:

$ git config --global color.diff.meta "blue black bold"

You can set the color to any of the following values: normal , black , red , green , yellow , blue , magenta , cyan , or white . If you want an attribute like bold in the previous example, you can choose from bold , dim , ul (underline), blink , and reverse (swap foreground and background).


Blue + orange = what color?

what does orange and blue make blue + orange = what color

You might be surprised to find the answer! So, if you’re curious, read on! You’ll soon become a color expert and feel more confident mixing paint for your artwork.

Orange and Blue – Opposites Attract

orange and blue make what color

Orange and blue are gorgeous colors to put together on a canvas. They are opposite each other on the color wheel, which means that these colors have a strong contrast.

But when you have two colors directly opposite each other, we also call them complementary colors. And that’s because it’s true that opposites attract.

These two colors are striking when used in juxtaposition. That’s why you’ll often find blue and orange used on a brand logo (for example, in the Firefox logo).

Interior designers also love using the blue and orange color palette. And as you can imagine, it looks incredible on canvas, too. The master, Vincent Van Gogh, incorporated blue and orange into many of his paintings.

Warm and Cool Colors

what color do blue and orange make

Blue is a primary color (as you probably remember from your art classes in elementary school!). It’s on the cool end of the spectrum. And when you look at a color wheel, you’ll find blue between purple and green. These are all cooler colors that evoke calm, tranquil vibes.

In contrast, orange is a warm color found between red and yellow. It’s a secondary color that you get when you mix these two primary colors.

what color do blue and orange make

Warm colors like orange are often used to convey passion, energy, love, and vivacity.

So, what is the result when you mix a warm secondary color with a cool primary color? Let’s find out what you get when you combine blue and orange!

What Color Do Blue and Orange Make?

what color do blue and orange make

When you mix orange and blue, you’ll end up with brown.

You might have discovered this accidentally if you use watercolors and your shades bled into each other.

But it’s helpful to know if you ever want to create brown. And by knowing this, you can also ensure that your colors don’t mix unless you want them to.

What do I mean by that? Well, imagine that you’re painting a vibrant scene. Maybe you’ve chosen to paint orange flowers against a blue background. The last thing you want is for your bright colors to mix together and become a dirty brown shade.

Any time you mix orange and blue, you’ll get a brown hue. The exact shade can vary depending on the colors you started with.

So, a bright, cooler orange will create a different result than a warm, earthy shade. And if you use a deep, dark blue, it will look very different from a pale blue.

But you can be sure that the result will be a shade of brown.

Colin Wynn
the authorColin Wynn

Leave a Reply