EzDevInfo.com

colors.js

get colors in your node.js console Marak/colors.js · GitHub colors.js - get colors in your node.js console

Eclipse, where to change the current debug line background?

Can anyone point me to the preferences page that has the setting of the DEBUG current line background color? I have changed almost all the colours to dark ones and still get annoyed by this almost white current line indicator while debugging (note that the current line indication in editing mode is OK).


Source: (StackOverflow)

How to get Color from Hexadecimal color code using .NET?

How can I get a Color from a Hexadecimal color code or say, Hash code (e.g. #FFDFD991)?

I am reading a file and getting Hexadecimal color code, I need to create the corresponding System.Windows.Media.Color instance for the Hexadecimal color code. Is there any inbuilt method in framework to do this?


Source: (StackOverflow)

Advertisements

How to color the Git console in Ubuntu?

I recently saw that the Git console in Windows is colored, e.g. Green for additions, red for deletions, etc. How do I color my Ubuntu Git console like that?

To install it, I used the command: $ apt-get install git-core

Thank you.


Source: (StackOverflow)

jQuery animate backgroundColor

I am trying to animate a change in backgroundColor using jQuery on mouseover.

I have checked some example and I seem to have it right, it works with other properties like fontSize, but with backgroundColor I get and "Invalid Property" js error. The element I am working with is a div.

$(".usercontent").mouseover(function() {
    $(this).animate({ backgroundColor: "olive" }, "slow");
});

Any ideas?


Source: (StackOverflow)

How to set the text color of TextView in code?

In XML, we can set a text color by the textColor attribute, like android:textColor="#FF0000". But how do I change it by coding?

I tried something like:

holder.text.setTextColor(R.color.Red);

Where holder is just a class and text is of type TextView. Red is an RGB value (#FF0000) set in strings.

But it shows a different color rather than red. What kind of parameter can we pass in setTextColor()? In documentation, it says int, but is it a resource reference value or anything else?


Source: (StackOverflow)

Algorithm to randomly generate an aesthetically-pleasing color palette

I'm looking for a simple algorithm to generate a large number of random, aesthetically pleasing colors. So no crazy neon colors, colors reminiscent of feces, etc.

I've found solutions to this problem but they rely on alternative color palettes than RGB. I would rather just use straight RGB than mapping back and forth. These other solutions also can at most generate only 32 or so pleasing random colors.

Any ideas would be great.


Source: (StackOverflow)

Setting bullet colors in UL/LI lists via CSS without using images or span tags

Imagine a simple unsorted list, with some <li> items nested inside <ul> tags. Now, I have defined the bullets to be square shaped via list-style:square; however, if I set the color of the <li> items, color: #F00; then everything becomes red!

While I ONLY want to set the color of these square bullets. What elegant code in CSS defines only the color of the bullets? Elegant meaning without using sprite images or span tags.

HTML

<ul>
<li>Item 1</li>
<li>Item 2</li>
<li>Item 3</li>
<ul>

CSS

li{
   list-style:square;
}

Source: (StackOverflow)

Hex transparency in colors

I'm working on implementing a wigdget transparency option for my app widget although I'm having some trouble getting the hex color values right. Being completely new to hex color transparency I searched around a bit although I couldn't find a specific answer to my question.

I want to set transparency by hex color so let's say my hex color id "#33b5e5" and I want it to be 50% transparent. Then I'll use "#8033b5e5" because 80 is 50%.

I found a useful chart here: http://www.dtp-aus.com/hexadeci.htm . With this data I managed to come up with this:

0% = #00
10% = #16
20% = #32
30% = #48
40% = #64
50% = #80
60% = #96
70% = #112
80% = #128
90% = #144

Now the issues start appearing when I get higher than 100 in hex. Hex color codes can only be 8 symbols long right? For example #11233b5e5 (80%) crashes.

What can I do to enable me to use the higher numbers aswell?


Source: (StackOverflow)

Change color of PNG image via CSS?

Given a transparent PNG displaying a simple shape in white, is it possible to somehow change the color of this through CSS? Some kind of overlay or what not?


Source: (StackOverflow)

Formula to determine brightness of RGB color

I'm looking for some kind of formula or algorithm to determine the brightness of a color given the RGB values. I know it can't be as simple as adding the RGB values together and having higher sums be brighter, but I'm kind of at a loss as to where to start.


Source: (StackOverflow)

Mac OS X Terminal Colors [closed]

I'm new to Mac having just got one after working with Ubuntu Linux for some time. Among the many things I'm trying to figure out is absence of colors in my the terminal window - like the ones that are shown (on linux) when you run 'ls -la' or 'git status'... I just can't figure out how to activate them in the actual shell.


Source: (StackOverflow)

How to get a Color from hexadecimal Color String

I'd like to use a color from an hexa string such as "#FFFF0000" to (say) change the background color of a Layout. Color.HSVToColor looks like a winner but it takes a float[] as a parameter.

Am I any close to the solution at all?


Source: (StackOverflow)

Ubuntu, vim, and the solarized color palette


I'd really like to get in on all the colorful goodness of the solarized colorscheme, but I can't seem to get it configured just right.
I have the main solarized file in my .vim/colors folder, I've set my terminal profile colors to what is listed on the site, and I've added the lines

 set background=dark
 let g:solarized_termcolors=16
 colorscheme solarized

to my .vimrc, but vim looks grey-ed out and is using a bright green color as the default. Any ideas?

Thanks in advance.


Source: (StackOverflow)

How to automatically generate N "distinct" colors?

I wrote the two methods below to automatically select N distinct colors. It works by defining a piecewise linear function on the RGB cube. The benefit of this is you can also get a progressive scale if that's what you want, but when N gets large the colors can start to look similar. I can also imagine evenly subdividing the RGB cube into a lattice and then drawing points. Does anyone know any other methods? I'm ruling out defining a list and then just cycling through it. I should also say I don't generally care if they clash or don't look nice, they just have to be visually distinct.

public static List<Color> pick(int num) {
	List<Color> colors = new ArrayList<Color>();
	if (num < 2)
		return colors;
	float dx = 1.0f / (float) (num - 1);
	for (int i = 0; i < num; i++) {
		colors.add(get(i * dx));
	}
	return colors;
}

public static Color get(float x) {
	float r = 0.0f;
	float g = 0.0f;
	float b = 1.0f;
	if (x >= 0.0f && x < 0.2f) {
		x = x / 0.2f;
		r = 0.0f;
		g = x;
		b = 1.0f;
	} else if (x >= 0.2f && x < 0.4f) {
		x = (x - 0.2f) / 0.2f;
		r = 0.0f;
		g = 1.0f;
		b = 1.0f - x;
	} else if (x >= 0.4f && x < 0.6f) {
		x = (x - 0.4f) / 0.2f;
		r = x;
		g = 1.0f;
		b = 0.0f;
	} else if (x >= 0.6f && x < 0.8f) {
		x = (x - 0.6f) / 0.2f;
		r = 1.0f;
		g = 1.0f - x;
		b = 0.0f;
	} else if (x >= 0.8f && x <= 1.0f) {
		x = (x - 0.8f) / 0.2f;
		r = 1.0f;
		g = 0.0f;
		b = x;
	}
	return new Color(r, g, b);
}

Source: (StackOverflow)

How do I globally configure RSpec to keep the '--color' and '--format specdoc' options turned on

How do I set global configuration for RSpec in Ubuntu.

Specifically so, --color and --format specdoc stay turned on, across all my projects (ie every time I run rspec anywhere).


Source: (StackOverflow)