What do the colours mean in the TortoiseGit log window? - version-control

What do the red and flesh coloured bars represent?

From the TortoiseGit source for Colors.cpp:
CurrentBranch: Red
LocalBranch: Green
RemoteBranch: Peach
Tag: Yellow
Stash: Gray
The colors of the branch lines on the left aren't significant and don't correspond to the branch bar colors:
BranchLine1: Black
BranchLine2: Red
BranchLine3: Green
BranchLine4: Blue
BranchLine5: Gray
BranchLine6: Olive
BranchLine7: Teal
BranchLine8: Purple

If you are talking about the log dialog:
the red are the local current branches
the flesh ones are the remote branches
the green ones are for tags non-current local branches
the yellow ones are for tags
Oran's answer (upvoted) has the complete list of color codes.

New marker: bisect
bisect good: blue
bisect bad: red (lighter)

The question and answers are for a very old version of TortoiseGit.
Never version (>= 2.0) do not only have different colors, but also different shapes for indicating local branches, remote branches, remote tracking branches, stash, bisect refs, etc. (cf. https://stackoverflow.com/a/61266764/3906760).
The current default colors are:
CurrentBranch: Dark Red (two different shapes)
LocalBranch: Green (two different shapes)
RemoteBranch: Peach (two different shapes)
Tag: Yellow (two different shapes)
Stash: Gray
Bisect Bad: Light Red
Bisect Good: Blue
Bisect Skip: Grey
The color of the commit graph does not correspondent to the colors of the shapes. THe line color is just there to make the graph better readable.
Some of the colors are configurable: https://tortoisegit.org/docs/tortoisegit/tgit-dug-settings.html#tgit-dug-settings-colours2

Related

Changing both Word Page Border Art Color

Is it possible to change both Word Page Border Art Color? I'm using one with blue and black, and I could only manage to change the black thin outer line.
With Interop, Microsoft released the Borders Interface.
There you'll find 2 members: InsideColor and OutsideColor, to return or set a value that indicates the 24-bit color of the inside/outside borders.

AuthotKey: Colour detection issue

I have a script which shows different messages depending on if a particular shade of red or green colours are detected, at set screen coordinates. The green detection is working fine, but the red detection is not working.
The script searches the specified x and y coordinate area which is set as: x1, y1, x2, y2.
Scripts seen below.
The hex colour for the green shade is #32CD32, and for red it SEEMS to be #FF0000 (both determined by hovering over the image using Active Window Spy).
Red text screenshot:
[![Red text to be detected][1]][1]
Green text screenshot:
[![Green text that is already successfully detected][2]][2]
My script is detecting green (#32CD32) perfectly. It will NOT detect the red colour #FF0000. I have tried many different variations of the red colour, and still cannot get the script to recognize it when it is on screen. Does anyone know how I can solve this?
This second script to detect RED does not work (note that the coordinates for both scripts aren't the same- the two colours are in different places on the screen):
^t::
Am I making a mistake with the hex colour of the red text? I know that the method overall works fine for green, so it should be straightforward for red.
This code searches the specified rectangle on the screen for a red pixel:
PixelSearch, Px, Py, 121, 282, 169, 310, 0xFF0000, 3, Fast RGB
AutoHotKey expects colors to be specified using a Blue-Green-Red (BGR) format unless you specify the RGB parameter. See the documentation for PixelSearch

GIMP will not blend completely to color using opacity and paint tool

I am stuck on a blending problem that appears to have only started once I started blending without any color. I am painting a grey suit and using shades to capture the lighting realistically. For some reason, when I paint with a dark grey over a light grey, with say 20% opacity, with enough strokes, the color I am painting will match the color in the color picker. With the reverse situation (light to dark), the paint tool never quite blends to the color in the color picker, it is always a shade or two off. No matter how many times I stroke the area, it will not become the color I have chosen. It has me dumbfounded and is crippling my ability to make light and shadow and show depth.
I have tried googling and messing with every possible option, deselecting all, triple checking what layer I am in, but I cannot seem to find anyone else with this problem...
I openned GIMP 2.8 (stable version) and the development version of GIMP and tried a procedure like the one you tell about:
Indeed, when working with 8 bit color, the wayGIMP is structured internally will prevent the gray values to converge toa precise shade of gray in same cases. When GIMP applies 20% of the difference between a value 129 to a pixel valued 127, that "20%" is a "0.4" darkening, which is rounded down to zero.
This certainly won't be dealt with on current GIMP stable, since it is fundamental to the way 8 bit color works, ansd given that GIMP unstable - the 2.9 version that will eventually be out as GIMP 2.10 can be set to use higher color precision so that this behavior does not happen. (With floating point pixel values, you just get as close as you want from your shade of gray).
I'd suggest you either find a compiled "nightly" version of GIMP 2.9 for your system, or try some other way of painting: maybe using a more spread shade of gray with values varying over a broader range, and after you are done, compressing the results to the desired range with the Levels or Curves tool.
Anyway, this is offtopic here - if you have further doubts on painting, please take the question to graphicdesign.stackexachange.com

How to change the histogram colour in Matlab

So i'm awful at Matlab and I mainly learn through examples and literally spelt out explanations.
So baring that in mind - Right now i'm trying to find how likely it is that one image i'm given is in anther via a histogram.
What i want to do is create 3 histograms for red, blue & green for each image and then add those into one image - So basically i'll have an image with a literal green histogram showing the green, a red one showing the red and a blue one showing the blue.
I know that to show a colour chanel in matlab i have to do imhist(image(:,:,1/2/3)
however that still gives me a histogram in blue.
I've looked up some things that are meant to help with this issue but it's normally aimed toward someone who knows what they're doing.... not helpful.
I've heard peope saying something like get(get(gca,'child')) which just seems giberish to me.
SO - for what i'm trying to do, image detection via histrograms, is this an appropriate method? And if so HOW do i create my 1 histogram that shows all 3 histograms in their respective colour
Cheers
You could use this version of imhist:
[counts,x] = imhist(...)
And then draw your histograms yourself, via bar, stem or similar.
These functions are then fully customizable and you can plug in your favourite color, linestyle, etc.

Changes Brightness in color replacement

I am working on replacing certain color in image by User's selected color. I am using OpenCV for color replacement.
Here in short I have described from where I took help and what I got.
How to change a particular color in an image?
I have followed the step or taken basic idea from answer of above link. In correct answer of that link that guy told you only need to change hue for colour replacement.
after that I run into the issue similar like
color replacement in image for iphone application (i.e. It's good code for color replacement for those who are completely beginners)
from that issue I got the idea that I also need to change "Saturation" also.
Now I am running into issues like
"When my source image is too light(i.e. with high brightness) and I am replacing colour with some dark colour then colours looks light in replaced image instead of dark due to that it seems like Replaced colour does not match with colour using that we done replacement"
This happens because I am not considering the brightness in replacement. Here I am stuck what is the formula or idea to change brightness?
Suppose I am replacing the brightness of image with brightness of destination colour then It would look like flat replacemnt and image will lose it's actual shadow or edges.
Edit:
When I am considering the brightness of source(i.e. the pixel to be processed) in replacment then I am facing one issue. let me explain as per scenario of my application.
for example I am changing the colour of car(like whiteAngl explain) after that I am erasing few portion of the newly coloured car. Again I am doing recolour on erased portion but now what happended is colour done after erase and colour before erase doesn't match because both time I am getting different lightness because both time my pixel of to be processed is changed and due to that lightness of colour changed in output. How to overcome this issue
Any help will be appreciated
Without seeing the code you have tried, it's not easy to guess what you have done wrong. To show you with a concrete example how this is done let's change the ugly blue color of this car:
This short python script shows how we can change the color using the HSV color space:
import cv2
orig = cv2.imread("original.jpg")
hsv = cv2.cvtColor(orig, cv2.COLOR_BGR2HSV)
hsv[:,:,0] += 100
bgr = cv2.cvtColor(hsv, cv2.COLOR_HSV2BGR)
cv2.imwrite('changed.jpg', bgr)
and you get:
On wikipedia you see the hue is between 0 to 360 degrees but for the values in OpenCV see the documentation. You see I added 100 to hue of every pixel in the image. I guess you want to change the color of a portion of your image, but probably you get the idea from the above script.
Here is how to get the requested dark red car. First we get the red one:
The dark red one that I tried to keep the metallic feeling in it:
As I said, the equation you use to shift the light of the color depends on the material you want to have for the object. Here I came up with a quick and dirty equation to keep the metallic material of the car. This script produces the above dark red car image from the first light blue car image:
import cv2
orig = cv2.imread("original.jpg")
hls = cv2.cvtColor(orig, cv2.COLOR_BGR2HLS)
hls[:,:,0] += 80 # change color from blue to red, hue
for i in range(1,50): # 50 times reduce lightness
# select indices where lightness is greater than 0 (black) and less than very bright
# 220-i*2 is there to reduce lightness of bright pixel fewer number of times (than 50 times),
# so in the first iteration we don't reduce lightness of pixels which have lightness >= 200, in the second iteration we don't touch pixels with lightness >= 198 and so on
ind = (hls[:,:,1] > 0) & (hls[:,:,1] < (220-i*2))
# from the lightness of the selected pixels we subtract 1, using trick true=1 false=0
# so the selected pixels get darker
hls[:,:,1] -= ind
bgr = cv2.cvtColor(hls, cv2.COLOR_HLS2BGR)
cv2.imwrite('changed.jpg', bgr)
You are right : changing only the hue will not change the brightness at all (or very weakly due to some perceptual effects), and what you want is to change the brightness as well. And as you mentioned, setting the brightness to the target brightness will loose all pixel values (you will only see changes in saturation). So what's next ?
What you can do is to change the pixel's hue plus try to match the average lightness. To do that, just compute the average brightness B of all your pixels to be processed, and then multiply all your brightness values by Bt/B where Bt is the brightness of your target color.
Doing that will both match the hue (due to the first step) and the brightness due to the second step, while preserving the edges (because you only modified the average brightness).
This is a special case of histogram matching, where here, your target histogram has a single value (the target color) so only the mean can be matched in a reasonable way.
And if you're looking for a "credible source" as stated in your bounty request, I am a postdoc at Harvard and will be presenting a paper on color histogram matching at Siggraph this year ;) .