Chrome DevTools Performance Audit - Main Colors - performance

Does anyone know what the colors on the main verticals represent? Some are obvious, like blue is html, purple is css.. but I'm unsure what's the difference between pink vs. light green.
Screnshot of Perfomance Audit

The Fine Manual explains that the colors are arbitrary:
DevTools assigns scripts random colors. In Figure 16, function calls from one script are colored light green. Calls from another script are colored beige. The darker yellow represents scripting activity, and the purple event represents rendering activity. These darker yellow and purple events are consistent across all recordings.
View network requests uses a fixed set of colors:
Requests are color-coded as follows:
HTML: Blue,
CSS: Purple,
JS: Yellow,
Images: Green

Related

Why does Angular Material use alpha to create grey colors?

I've noticed that in angular material when they need a grey they take black and then adjust it's alpha to be lighter. For example if you go here: https://material.angular.io/components and inspect any of the cards on the page, you'll notice the body paragraph has the font color rgba(0, 0, 0, .54);. Does anyone know why they choose to create greys by taking black and adjusting the alpha this way as opposed to just using hex or rgb? The only thing I can think of is that it helps support the warm and cool themes.
From https://material.io/guidelines/style/color.html#color-usability
Do: Using opacity instead of shifting colors often creates better contrast and relative luminance. For example, gray text (#727272) becomes hard to read if the background color changes to magenta.
Don't: Shifting to gray instead of decreasing contrast on black often lowers the relative luminance, making typography unreadable.

Setting the background to transparent using GIMP

Using GIMP 2, I have an image of a grey chair on a white background, as below:
I now want to set the background to transparent. Therefore, I decided to use GIMP's "Color To Alpha" tool. So, I told it to set all pixels which are white (255, 255, 255) to transparent, as below:
This did set all white pixels to transparent. However, it also set the grey pixels on the chair to be partially transparent, as below:
So when I export this image and place it in front of a background, there is no white box around the chair -- but the background partially shows through the chair.
What am I doing wrong?
First, this question is offtopic here, and should be on https://graphicdesign.stackexchange.com .
Second, it is trivial enough just to answer: the color to alpha plug-in is not there to turn a single color, as seem on the image, to transparency: it is a sophisticated plug-in that will remove one color of your image in a way that, if you lace the new image over a background of the same color the color you removed, you get the original image back.
Thus, in your case, it removed the "whiteness" of your chair, transforming all pixels to different opaque shades of black - so that when placed over white, you get the original image.
To simply remove the white, you have to cick on the Select By Color tool (by default th 5th icon on the toolbox), click on the white background to have it selected, and then just edit->cut. (It won't work if your image layer does not have transparency to start with - if that is the case, prior to edit->cut do Layer->Transparency->Add Alpha Channel).
If you get aliased borders, then, after edit>cut, but prior to dismissing your selection, you can do Select->Border... by 1 or 2px, and then use the color to alpha filter with White on this selection.
For more information on Color to Alpha, I have this other answer its use and comparison with edit-cut here: https://graphicdesign.stackexchange.com/questions/28058/gimp-color-to-alpha-is-not-selectable/28097#28097
Just use a selection to restrict the action of Color to alpha where it matters: backgroundand edge pixels:
Select background with fuzzy select
Select>Grow by one pixel so that the selection ofverlaps the edge pixels
Color>Color to alpha

Classifying color in dark surroundings

In a program I am working on, I am trying to classify colors based on their RGB values as red, orange, yellow, green, blue, or white. I am classifying them by comparing the given RGB values to a constant "ideal" value for each color and finding the minimum euclidean distance in a three dimensional space. However, I am having trouble when the color I am analyzing comes from a dark image as the current program has difficulty differentiating between orange, yellow, and red within dark images. How should I fix or work around this issue?
The environment is always going to cause problems. Say if the only light source is red you won't be able to tell apart gray, green or blue.
If your situation is not that complex you could try to adjust the image. Almost all image processing software/libraries have some functions to that end. Probably the best solution would be to have some calibration components in the scene like a white ball that you know what color it should be and can help you adjust the image and make the color identification easier.

How should turning of SCNLight affect background color?

I have a scene that consists of a few SCNNodes in front of a blue background. I would like to turn off the light when SCNAction.rotate... actions on the nodes have completed.
What I currently try is setting SCNLight.color to SKColor.blackColor(). This turns my nodes into black surfaces but leaves the blackground in blue.
Is this a feature (of SceneKit) or a bug (presumably in my code)? If it is the former how could I switch the light "completely" off (preferably with an animation).
If you set a background color, that is going to be independent of the lighting in the scene, it's just a background color. You could animate it to also be black when you turn of the light if you wanted to.
The scene (SCNScene) also has a background material property that you can set the contents of. This material property should be affected by the light in your scene.

CIFilter HueAdjust

How to programmatically change the hue of UIImage?
I am using the above page's advice, for Core image filter CIFilter. The only problem I am having is my when I rotate to a yellow hue, it's a dark mustard yellow, and I can't get the brightest vibrant yellow, ie R:255 G:255 B:0. I have images that are on layers that are made up of a simple color R:255 G:0 B:0 I just want to rotate around, to get the basic colors plus orange. Orange works fine tho.
I just don't know why when I rotate from R:255 to try and get R:255 G:255 Yellow it's a dark yellow.
I am using 1.04719755 for the Yellow float, at deltaHueRadians
I don't know it's just weird this is the 3rd attempt at this but I keep getting a dingy yellow.
I realized the problem.
In Photoshop I have done so many Colorize operations when I used to photo edit, I got them confused with Hue Rotation.
Basically when you Colorize in Photoshop, it will "Colorize" the image not just Hue Rotate the values.
The difference between the two is a very thin line depending on what images you use. I don't really feel like going into a complete explanation but...
Say you have a grey cube on a layer, and you COLORIZE the image, the cube will rotate colors as you use a slider. If you Hue rotate it will stay grey.
But if you take a red cube, and hue rotate, then the hue rotation will take you thru colors, not necessarily all of them tho like a colorize.
I believe the issue has to do with all that good ole HSV RGB matrix crazy math problems. Which I am not doing right now. Keeping it simple.
I decided to just do a colorize method with:
CGContextSetBlendMode(context, kCGBlendModeMultiply);
With grey objects and this is perfectly what I wanted.
from googling I found this:
http://coffeeshopped.com/2010/09/iphone-how-to-dynamically-color-a-uiimage

Resources