I need to convert some stock icon imagery to a pre-existing colour scheme. The method for conversion is to simply adjust the image hue to the right level.  However all I have to go on is existing imagery that has already undergone the process. As such, I know that the muddy green of 99b963 should become the dull mauve of 7763b9.  My current method is trial and error: I zoom in to an area of green, overlay a layer featuring an adjacent pixel of the target mauve, select the original layer, then adjust saturation until it looks right. At that point I step out of the adjustment dialogue, get the color picker out, and compare. Repeat until just right.  Does Photoshop / Gimp / Paint.NET have a simpler, procedural method for achieving this, in 1 step if possible? If not, is there a less trial-and-error method to achieve the right hue given a target colour difference?
I have this graphic. I need to change the color of the graphic to hex color: 1485cc...is there a way to make this graphic match that particular hex color hue...without me having to have to re create the graphic.
Arduino-controlled slot cars - alternative to MOSFETs for speed control? I'm attempting to control the speed of two slot cars in a set using Arduino.    Each car is controlled by a controller with a variable resistor that looks like this:    They're wired in parallel to the same 17V DC power supply:    Simplified:    For Arduino control, I experimented with manipulating a single car's speed using a MOSFET. It worked really well. Using a PWM output on the Arduino, I was able to pulse the MOSFET on and off to throttle the current and change the car's speed. The behavior of the MOSFET seemed to be exactly the same as the variable resistor controller; the resistance, voltage, and current fluctuated the same way on various parts of the circuit.  Enter car B. I added a MOSFET to the setup and mimicked the MOSFET wiring for car A, grounding them both to the Arduino ground. The result looks like this:    Here's a sketch:    Close up, MOSFET A:    MOSFET B:    At first, all seemed well. I sent signals to MOSFET A and successfully changed Car A's speed. I stopped Car A and pulsed MOSFET B, and I was able to control Car B's speed just fine.  Then, I turned Car B to a constant speed, and sent a signal to MOSFET A while Car B was still running. Car A started, but Car B's speed immediately dropped as a result of running Car A.  I hooked a multimeter up across the rails of Car B and watched its voltage while it ran on its own. Then, sure enough, when Car A started running alongside it, Car B's voltage dropped dramatically.  I figured this was because of my wiring configuration, so I left the multimeter on Car B, and made one change. I replaced MOSFET A with the original slot car controller:    I started running Car B again using its MOSFET. The multimeter showed a steady voltage, so I began to squeeze Car A's controller (the variable resistor), and Car A's speed increased. This time, however, unlike using a MOSFET to control Car A, the variable resistor did not affect Car B's voltage at all. Car B remained at a steady speed the whole time.  Any idea why this happens? The MOSFET seemed to function the same as the variable resistor (empirically) with a single car, but had totally different behavior with two cars in parallel. Is it because the MOSFET is not really changing resistance to current, but just switching it on and off, so it opens up another path for current to flow fully every time it closes? Is there an Arduino-controllable alternative to a MOSFET that would fluctuate actual resistance like the variable resistor? Digital potentiometer? Servo hooked up to a potentiometer? ;) I'm really curious what the difference is and what causes the major differences in behavior. How do I get from Terminal 1 to Terminal 5 in Fiumicino Airport? How do I get an animated gif to work in WPF? What control type should I use - Image, MediaElement, etc.? Combinatorial Proof Question: Vandermonde convolution identity How to synchronize clocks for computers that are not online? Creating your own Tinyurl style uid I'm writing a small article on humanly readable alternatives to Guids/UIDs, for example those used on TinyURL for the url hashes (which are often printed in magazines, so need to be short).  The simple uid I'm generating is - 6 characters: either a lowercase letter (a-z) or 0-9.   "According to my calculations captain", that's 6 mutually exclusive events, although calculating the probability of a clash gets a little harder than P(A or B) = P(A) + P(B), as obviously it includes numbers and from the code below, you can see it works out whether to use a number or letter using 50/50.  I'm interested in the clash rate and if the code below is a realistic simulation of anticipated clash rate you'd get from generating a hash. On average I get 40-50 clashes per million, however bare in mind the uid wouldn't be generated a million times at once, but probably only around 10-1000 times a minute.  What is the probability of a clash each time, and can anyone suggest a better way of doing it?  static Random _random = new Random();  public static void main() {     // Size of the key, 6     HashSet&lt;string&gt; set = new HashSet&lt;string&gt;();     int clashes = 0;     for (int n=0;n &lt; 1000000;n++)     {         StringBuilder builder = new StringBuilder();          for (int i =0;i &lt; 7;i++)         {             if (_random.NextDouble() &gt; 0.5)             {                 builder.Append((char)_random.Next(97,123));             }             else             {                 builder.Append(_random.Next(0,9).ToString());             }         }          if (set.Contains(builder.ToString()))         {             clashes++;             Console.WriteLine("clash: (" +n+ ")" +builder.ToString());         }          set.Add(builder.ToString());         _random.Next();         //Console.Write(builder.ToString());     }      Console.WriteLine("Clashes: " +clashes);     Console.ReadLine(); }   UPDATE:   from this question  I really asked two questions here so I was cheating. The answer I was after was rcar's, however Sklivvz's is also the answer to the 2nd part (an alternative). Is it possible to make a custom unique id generator in a database, or would it be client side (which would be 2 possible reads first)?  The general idea I was after was using Ids in databases or other stores that can be used by phone or printed material, not a giant 16 byte guid.  UPDATE 2: I put the formula for two mutually exclusive events above instead of 2 independent ones (as getting an 'a' the first time doesn't mean you can't get an 'a' the second time). Should've been P(A and B) = P(A) x P(B) How to make foam with bubbles (beer, bath) My goal is create realistic foam. I mean really realistic foam with bubbles, no only SSS shader and done :-).   Use particle system's is not enough, because bubbles overlaps and black artifact's appear.  Any ideas? Some reference images and something about bubbles:    EDIT:  I want this for 360° turntable animation. Bubbles and foam does not to be animated, but should be good keep reasonable render time.  Of course, if someone know how to make it animated I glad to learn it and I'm sure I'm not only one. But my priority is realistic look, not animation.  Only for clarification: I don't need to know how to make bubbles in beer (there is very good tutorial by Andy Price), please focus only on foam. Beer is not important. Clicking leave closed shows the reopen pop-up Users with less than 50 reputation points cannot write comments on questions and answers that they don't own.  Why does this limit exist? But I want to contribute now. What should I do instead? But I can't write a good answer without more information! Shouldn't I be allowed to post comments if I have reputation on a different site? But I saw a new user posting a comment! How did they do it? Why do I need 50 reputation to comment on my own post?   See also:    in the Help Center Can't do reviews after failing 1 audit Why does the mirror modifier sometimes give me an overlapping mesh? Are PHP short tags acceptable to use? Here's the information :     There are four different pairs of   opening and closing tags which can be   used in PHP. Two of those, &lt;?php ?&gt;   and &lt;script language="php"&gt; &lt;/script&gt;,   are always available. The other two   are short tags and ASP style tags, and   can be turned on and off from the   php.ini configuration file. As such,   while some people find short tags and   ASP style tags convenient, they are   less portable, and generally not   recommended.   In my experience most servers do have short tags enabled. Typing  &lt;?=   is far more convenient than typing  &lt;?php echo    The programmers convenience is an important factor, so why are they not recommended? I have the task of creating a simple Excel sheet that takes an unspecified number of rows in Column A like this:  1234 123461 123151 11321   And make them into a comma-separated list in another cell that the user can easily copy and paste into another program like so:  1234,123461,123151,11321   What is the easiest way to do this? When playing as a spellcaster, is it valid the use of the Ready action to prepare Dispel Magic to counter a spell cast by an opponent? In the same vein, when declaring said action, do I have to specify which spell slot I will use when Readying the Dispel Magic spell? If that is the case, does this tactic nullify an opponent's spell? I get the impression that this is basically turning Dispel Magic into a spell with a casting time of &quot;1 reaction&quot;. Is my reading of the rules accurate? This weekend is a "Supermoon" (the largest full moon of the year, in perigee, the closest to Earth). Would someone please advise how I could make the most out of my Canon PowerShot to photograph this phenomenon?    What settings should I use?    What times are the best with respect to the exact times of moonrise and moonset provided by the U.S. Naval Observatory? In other words, is it better 30 min before it crosses the horizon? Or just at the crossing? Are there any tips and tricks for a beginner to benefit from?  Are moonrises or moonsets generally better/easier to capture? Are there different techniques for different phases of the moon?   I read that full moon tends to come out flat, but I also want to benefit from the perigee. Primefaces growl is not working in all the pages Is there an idiom that means "revealing a secret unintentionally"? I am thinking there could be an idiom that states that you or someone revealed a secret unintentionally? Can you think of an idiom like that? I am looking for an idiom I can use to write a blog post about the recent incident where Secretary Pompeo unintentionally revealed the dirty secrets behind the CIA. Cardinalities of the intervals $(-1,1)$ and $[-1,1]$ What would you call a person who systematically dumps his work on you in a bid to evade responsibilities (with a work philosophy that when you don't learn or do it, you are never given the responsibilities and thus have no fear of making mistakes) but cluelessly whines to the same people around him for not having all the benefits that they (the higher ranking hardest working colleagues) earn.  PS: Owing to a bad management (Racial discrimination, Poor work ethic,ignorance, etc), if it helps. Correcting for multiple kruskal wallis tests