Material design colors

I am trying to implement material design. Is there a constants for colors? For example, i can use @color/material_grey_850, but when I try to use @color/material_orange_500 - compilation failes. Can I use constants or I must use only values (#9E9E9E

Java: Color Grid Columns with If-Else Statements

I have been tinkering with setting certain columns to certain colors with no correct outcome. I am somewhat stumped on the majority of it. I'd appreciate any help! What I'm attempting to accomplish: Use a series of if - else statements to make column

No Colors.xml file in the Android project

I was looking at the following Stackoverflow post in a attempt to change my layout's background color. It said to go add a new color in the "colors.xml" file located at res\values\colors.xml I went to that directory but there was no colors.xml f

Change text color in CSS with Bootstrap (Nav-pills)

I was using bootstrap to make a website with bootstrap when I encountered a small problem. I was trying to change the color of the text in my navigation bar (pills): HTML: <nav> <ul class="nav nav-pills nav-justified"> <li class=&

Iterate through a list and draw a color square

Where to begin........... I have a colored box, I want it to change color every 1/2 second, however I want my code to run as well. I'm using Java AWT's Graphic Api to draw using g.fillRect(568, 383, 48, 48); where g is wrapped to 'Graphics.' So you'd

How to replace one color with another?

This is general question (between programming and math): How to replace a color by another in a bitmap? I assume the bitmap is a 2D-array Example : Let's replace RGB color [234,211,23] by RGB color [234,205,10]. How to do this color replacement, such

Let's finish color Konsole?

I've got a problem with ANSI escape codes in my terminal on OpenSuse 13.2. My Makefile use to display pretty colors on OSX at work but at home when I use it I get the litteral termcaps such as \033[1;30m ... \033[0m I know close to nothing about term

? attr / do not set the correct color in the toolbar

I am using the same code from for my project. When I created a blank project to only test the Toolbar, the color is working as it should. However, after upgradin

unable to get colors from colors.xml in android

This may look as a simple question but I am struck at this for last 1 hr. I have declared colours in color.xml file but unfortunately unable to get those colours while setting the colour attribute to textview. Color.xml <?xml version="1.0" en

Change the color of a label every x seconds

Is there a way implement something like this? I have tried using TTAttributedLabel but to no success (no flashing and time doesn't change anymore). Does anyone know of a way to make something like this happen? Any help

TextView on the same line, selecting one cancels the other

I'm new to Android. I have a list of LinearLayouts; each list has 3 TextView's, 2 clickable TextViews 'Da' and 'Nu' and one only for the Text. If i click on the 'Da' textview it will turn Green and if i click on the 'Nu' it will turn Red. My problem

Is there a shortcut for the color picker in NetBeans?

Is there a shortcut for color chooser in NetBeans? I found this same query on NetBeans website, it was said that this was possible but I can't find an actual answer how to do it. I mean this: when I am in a CSS file and I am editing a property that i

Set the background color according to the outside temperature

Heyoh SO, I have a temperature widget to implement on a project I am working on. Nothing is specially difficult, I've got a free API to retrieve the datas that I need ect. BUT, the lovely designer who works with me would have a color feature for whic

Replace the brackets to extend the javascript

I want to manipulate the DOM a bit and need some help. That's my HTML-Markup: <span class="content"> This is my content: {#eeeeee}grey text{/#eeeeee} {#f00000}red text{/#f00000}</span> That's how it should be: <span class="co

How can I convert RGB to CMYK and vice versa to python?

If I had a RGB decimal such as 255, 165, 0, what could I do to convert this to CMYK? For example: >>> red, green, blue = 255, 165, 0 >>> rgb_to_cmyk(red, green, blue) (0, 35, 100, 0) Here's a Python port of a Javascript implementation. c

Play a pixel on the game screen (OpenGL or DirectX)

I want to read the color of a pixel at a given position in a game (so OpenGL or DirectX), by a third-party application (this is not my game). I tried to to it in C#, the code works great for reading the color of the desktop, of windows, etc, but when

Generate a random RGB color using the rand () function

I need a function which will generate three numbers so I can use them as RGB pattern for my SVG. While this is simple, I also need to make sure I'm not using the same color twice. How exactly do I do that? Generate one number at a time with simple ra

Java Color by age

I'm writing a little app that displays some graphics and just now I'm trying to change the color depending on the age of an Object (saved via System.currentTimeMillis()) so the oldest are blue and the newest Objects get displayed Red or so. Does anyo

jQuery color animation plugin does not work in IE or Firefox

I have looked around on here but can not find out why this is not working properly. I want to make a simple fading in color background on hover. It is only working in Chrome but not Firefox or IE. Any help would be greatly appreciated! HTML: <div id=

Sampling color in an image with Perl

Is there a way to sample the color (know what is the color or the range of colors) in a specific area in a given image using perl? Let's say I have a 200X200 image and I want to sample the color (or colors) in the area X: 15; Y: 30;. Is there a way t

Java - Coloring Image

I've tried to create colored gray image with given colour but I always failed. I know I have to use BufferedImage and load all pixels of source image into array, but I don't know how to work with color value, so there always were some weird colors af

How to convert a string to Hex?

Is there any way to convert a string to hexa and then to convert it to a .Net color? I would like to know how to convert a string of color ,say Black, to its Hexa '#000000' ? i.e. if my input is "Black", i should return "#000000" My is

formula for the alpha value when mixing two transparent colors

lets assume an alpha of 1 means fully opaque and 0 means fully transparent. lets say i have two black images which have 50% transparency (alpha = 0.5). if they are laid on top of each other, the resulting transparency is 0.75, right? if they would ha

How to interpolate hue values ​​in the HSV color space?

I'm trying to interpolate between two colours in HSV colour space to produce a smooth colour gradient. I'm using a linear interpolation, eg: h = (1 - p) * h1 + p * h2 s = (1 - p) * s1 + p * s2 v = (1 - p) * v1 + p * v2 (where p is the percentage, and

Iterate over colors

Is there a good way to iterate over colors? I know it sounds like a strange question but here's an analogy. Suppose you write a game where you travel around the Earth. You pick a starting point and then you define a rule that you apply repeatedly. Fo